ruby-on-railsrubyemailinfusionsoft

Infusionsoft send email method to add multiple cc_address or bcc_address


looking for a way to add multiple email_address in the cc_addresses in using infusionsoft ruby email_send method

I tried all following methods but none worked

1st try:

Infusionsoft.email_send([contact1,contact2],"support@ex.com","test@acnt.in","'test2@acnt.com','test@acnt.in'","","multipart","Testmail","","This the testmail")

2nd try:

Infusionsoft.email_send([contact1,contact2],"support@ex.com","test@acnt.in",
['test@acnt.com','test2@acnt.in'],"","multipart","Testmail","","This the testmail")

3rd try:

contacts = ["test@acnt.in","test@acnt.com"]

Infusionsoft.email_send([contact1,contact2],"support@ex.com","test@acnt.in",
contacts ,"","multipart","Testmail","","This the testmail")

I want to send a mail to multiple users and a user who has received mail should be able to see the other contacts in the list as well.

Referring to rubydoc on infusionsoftgem


Solution

  • After All tires found answer

    Infusionsoft.email_send([contact1,contact2],"support@ex.com","tes@acnt.in","test2@acnt.com test3@acnt.in","","multipart","Testmail","","This the testmail")
    

    Adding email ids with no commas or double quotes for each and binding all email under double quotes with space worked good

    "tes@acnt.com test2@acnt2.in"
    

    With that

    [contact1,contact2] 
    

    should contain all contact ids ,that has to be added in cc or to address without contact id the mail fails to deliver

    Above shown method works on both "to address" and "cc addresses"