1

Does JMail accepts delimiter(;) or comma(,) as a separator between different email address like CDO.Message.

For example, we can write,

Mail.To="a@a.com,b@b.com" in CDO.Message.

Does the same is valid for JMAIL like the one below.

jMail.AddRecipient ("a@a.com,b@b.com")

I know we can add multiple recipients by calling the AddRecipient again and again but my question is can we do it in a single line like in CDO.Message?

2 Answers2

0

yes you can add multiple recipients by calling the AddRecipient

  • which character should I use to separate two emails. Is it comma(,) or semicolon(;) – user3035768 Nov 26 '13 at 12:59
  • I don't know the Jmail component, buyt couldn't you just try both methods and see what happens. You'll either receive two emails or get an error message – John Nov 26 '13 at 14:42
0

Yes, you can.

I spent some time figuring this out as well. I tried the recommended array() of recipients but that did not seem to work. The only thing which worked for me so far was a properly formatted multiple recipient string:

$jmail->addRecipient('recipient1@site.com','recipient2@site.com','recipient3@site.com');

Please note the ["] markup. If you replace the ["] with ['] it will not work. It's little "delicate" this way :)

I am using jMail with PHP/COM extension but I am sure you can reuse this principle for ASP or any other language.

I hope this helped.

Milan
  • 3,209
  • 1
  • 35
  • 46