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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Duketown

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

Post 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
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 173
Joined: Fri Feb 06, 2009 2:08 pm

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

Post 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.
Duketown

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

Post by Duketown »

OK, thanks for this input.
Mail method is now set to "mail", so that explains it.
Have to change coding.

Duketown
Post Reply

Return to “CMSMS Core”