send email to multiple people from access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • okan
    New Member
    • Feb 2007
    • 7

    send email to multiple people from access

    Hi everyone.

    Is it possible that send same email to multiple people in table/form anyone with the same draft.

    1.Private Sub Command20_Click ()

    2.Dim body As String

    3.body="hello all"
    4.If Me.ePosta <> "" Then
    5.DoCmd.SendObj ect acSendNoObject, , , Me.ePosta, , , "hi", body, True
    6.End If
    7.Exit Sub
    8.email_error:
    9. MsgBox "An error was encountered." & vbCrLf & "The error message 10. is: " & Err.Description
    11. Resume Error_out
    12. Error_out:
    13. End Sub

    this code sends mail only one person. i want to send same mail to whole people.
    i mean that it must be shown that to: bla@bla.com;bla 2@bla.com;bla3@ bla.com ......

    like that

    thanks
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Originally posted by okan
    Hi everyone.

    Is it possible that send same email to multiple people in table/form anyone with the same draft.

    1.Private Sub Command20_Click ()

    2.Dim body As String

    3.body="hello all"
    4.If Me.ePosta <> "" Then
    5.DoCmd.SendObj ect acSendNoObject, , , Me.ePosta, , , "hi", body, True
    6.End If
    7.Exit Sub
    8.email_error:
    9. MsgBox "An error was encountered." & vbCrLf & "The error message 10. is: " & Err.Description
    11. Resume Error_out
    12. Error_out:
    13. End Sub

    this code sends mail only one person. i want to send same mail to whole people.
    i mean that it must be shown that to: bla@bla.com;bla 2@bla.com;bla3@ bla.com ......

    like that

    thanks
    Assuming Me.ePosta is where the email address is stored do you want to send it to everyone in here or just some of them.

    Comment

    • okan
      New Member
      • Feb 2007
      • 7

      #3
      ePosta is a field which stores email addresses of people. code is trying to get mail address from this field and connect to outlook and send body to the receiver. this code is ok for sending mail only choosen email, but i have for example 50 user and i want to send the sample email to all of them. Is there a way to make it?

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        Originally posted by okan
        ePosta is a field which stores email addresses of people. code is trying to get mail address from this field and connect to outlook and send body to the receiver. this code is ok for sending mail only choosen email, but i have for example 50 user and i want to send the sample email to all of them. Is there a way to make it?
        You say you have an example of 50 users but is this all the users in the table or is there some query to decide which users will be receiving the email?

        Comment

        Working...