Share via

Sending multiple emails through Access

Anonymous
2011-12-16T07:47:30+00:00

I have tried out the coding as per Arvin Meyer's "http://www.datastrat.com/Download/EmailSenate2K.zip" in my application.  Strangely, clicking the "Email Report" button for the 1st time, error message "The MySystem cannot send this email." always appears.  After clicking OK, I click the "Email Report" button again, the email screen is displayed and can be sent out successfully afterwards.  Any idea why please?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2011-12-17T05:29:25+00:00

    Yeah, I seem to remember that and the coding is fine.  Have a look at...

    http://www.dimastr.com/redemption/home.htm

    http://www.contextmagic.com/express-clickyes/ (free version available)

    http://www.slipstick.com/outlook/outlook-email-security-update/ (see bottom of page for other programs that handle the security issue)

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-12-17T05:17:53+00:00

    Yes, I have tried using Hotmail as the default emailing program.  The same message "The xxx System can't send this e-mail message." shows up.  One more point, between then and my clicking "email report" for the 2nd time, the circular signal (hourglass) keeps turning.  Yet that goes away after the email is sent out successfully.

    Well, I guess the problem is not with the coding, but with something else. Looks queer to the users though.  Appreciate advice.  Many thanks.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-12-17T04:09:49+00:00

    I don't see anything wrong there...  I seem to remember a security issue when using Outlook 2003 to send eMails which resulted in *Click YES* to get around that.  This might be the problem.  Do you get a message when sending eMails via another program?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-12-17T02:30:29+00:00

    I have not made any significant changes except adding in "bcc".

    My codes are as below.  Many thanks for help.

    ********************************************************

    Private Sub cmdEmail_Click()

    On Error GoTo Err_cmdEmail_Click

        Dim strDocName As String

        Dim strEmail As String

        Dim strBcc As String

        Dim strMailSubject As String

        Dim strMsg As String

        DoCmd.Hourglass True

        strDocName = Me.lstRpt

        strEmail = Me.txtSelected & vbNullString

        strBcc = Me.txtSelectedbcc & vbNullString

        strMailSubject = Me.txtMailSubject & vbNullString

        strMsg = Me.txtMsg & vbNullString & vbCrLf & vbCrLf & "Tony Law" & _

            vbCrLf & "Raiment Custom Tailors" & vbCrLf & "Email : ******@hotmail.com" & _

            vbCrLf & vbCrLf & "This email and any attachments are intended only for use by ........."

            DoCmd.SendObject objecttype:=acSendReport, ObjectName:=strDocName, _

                 outputformat:=acFormatHTML, _

                 To:=strEmail, Bcc:=strBcc, Subject:=strMailSubject, MessageText:=strMsg

    Exit_cmdEmail_Click:

        Exit Sub

    Err_cmdEmail_Click:

        MsgBox Err.Description

        Resume Exit_cmdEmail_Click

    End Sub

    ' ------------------

    Private Sub lstRpt_Click()

        Me.cmdEmail.Enabled = True

    End Sub

    Private Sub lstMailTo_Click()

    Dim varItem As Variant

    Dim strList As String

    With Me!lstMailTo

        If .MultiSelect = 0 Then

            Me!txtSelected = .Value

        Else

            For Each varItem In .ItemsSelected

                strList = strList & .Column(0, varItem) & ";"

            Next varItem

            strList = Left$(strList, Len(strList) - 1)

            Me!txtSelected = strList

        End If

    End With

    End Sub

    ' -----------------

    Private Sub lstBcc_Click()

    Dim varItembcc As Variant

    Dim strListbcc As String

    With Me!lstBcc

        If .MultiSelect = 0 Then

            Me!txtSelectedbcc = .Value

        Else

            For Each varItembcc In .ItemsSelected

                strListbcc = strListbcc & .Column(0, varItembcc) & ";"

            Next varItembcc

            strListbcc = Left$(strListbcc, Len(strListbcc) - 1)

            Me!txtSelectedbcc = strListbcc

        End If

    End With

    End Sub

    ****************************************************************

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2011-12-16T17:09:33+00:00

    Never had that problem... did you change to code any?  if yes please post it here...

    Was this answer helpful?

    0 comments No comments