• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

How can I can to multiple recipients using "mailto:"

I'm using the code below to quickly send an email. I can send to one "to" and one "cc" recipient using this code.
Is there a quick way to modify this so I can send to more than one "to" and more than one "cc" recipients?
I've already tried putting ";" and "," between email addresses and that won't work.

    eStr = "mailto:" & clt!Email
    If clt!email2 <> "" Then eStr = eStr & "?cc=" & clt!email2
    Call ShellExecute(hwnd, "open", eStr, "", "", 0)
  • 2
  • 2
1 Solution
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
ShellExecute 0, "open", "mailto:mailone@sth.com; mailtwo@sth.com;", "", 0, 0
End Sub

Worked fine when I tried it! Just add e-mails and put "; " (mind the space) behind it.

I hope this helped,
spoowizAuthor Commented:
it worked. when i add the 2nd email, outlook express takes a quite a bit longer to create the new mail msg. is that the same with you?
quite a bit longer = ???
It does make a difference, but it isn't even a second when I try it.
spoowizAuthor Commented:
mine takes about 5 to 10 seconds
anyways, thanks for your response
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now