Page 1 of 1

AddCC email doesn't seem to work in CMSMailer (for me)

Posted: Tue Jan 11, 2011 9:39 pm
by Duketown
Hi,

I am using the following UDT:

Code: Select all

// Send test mail with debug {ExtendedCMSMailerTest}
$email = 'me at google dot something';
$subject = 'Test of CMSMailer functionality';
$body = 'Test message';

global $gCms;
$mail =& $gCms->modules['CMSMailer']['object'];
$mail->AddAddress( $email );
$mail->AddCC($email);
$mail->IsHTML( false );
$mail->SetBody( $body );
$mail->SetSubject( $subject );
$mail->Send();
$mail->reset();
The mail arrives at the $email address, but the copy is not send/received.
Is there a check that the two may not be the same?

I'm testing this in a 1.8.2 environment with CMSMailer version 2.0
Searching in this forum for AddCC revealed nothing. Do I need another search argument to get to the answer?

Duketown

Re: AddCC email doesn't seem to work in CMSMailer (for me)

Posted: Tue Jan 11, 2011 10:24 pm
by PinkElephant
Looking at CMSms 1.9.2 : modules/CMSMailer/phpmailer/phpdoc/PHPMailer/PHPMailer.html#methodAddCC", I'd guess you need to use smtp:

Code: Select all

AddCC (line 301) 
Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.

Re: AddCC email doesn't seem to work in CMSMailer (for me)

Posted: Tue Jan 11, 2011 11:18 pm
by Duketown
OK, thanks for this input.
Mail method is now set to "mail", so that explains it.
Have to change coding.

Duketown