I want to edit the mail that is sent for providing activation link to newly registered member.
I want to use phpmailer to send that email.
How can i do that?
I want to use phpmailer to send that email.
How can i do that?
<cms:member_process_registration_form
_send_mail='0'
/>
<cms:if k_success >
<cms:send_mail ...
...
<cms:set_flash name='success_msg' value='1' />
<cms:redirect k_page_link />
</cms:if>
<cms:member_process_registration_form
_send_mail='0'
/>
<cms:if k_success >
<cms:php>
require_once('PHPMailer/PHPMailerAutoload.php');
$name=$_POST["member_displayname"];
$email=$_POST["member_email"];
$my_msg="Welcome".$name." we sent this message to your email ".$email." "."<cms show: k_member_activation_link />"." good";
$msg="Welcome".$name." we sent this message to your email ".$email;
$mail = new PHPMailer;
$mail->IsSMTP();
$mail->SMTPAuth = 1;
$mail->Host = "smtp.mandrillapp.com";
$mail->SMTPSecure = "tls";
$mail->Port = 587;
$mail->Username = "xxxxx@gmail.com";
$mail->Password = "xxxx";
$mail->SMTPDebug = 4;
$mail->SetFrom('xxxx@gmail.com', 'xxxx');
$mail->AddReplyTo('xxxx@gmail.com', 'xxx');
$mail->Subject = "Welcome mail from xxx";
$mail->AltBody = $my_msg."To view the HTML message, please use an HTML compatible email viewer!";
$mail->MsgHTML($msg);
$mail->AddAddress($email,$name);
if(!$mail->Send())
{
echo "Mailer Error: ".$mail->ErrorInfo;
}
else
{
echo "Message sent!";
}
</cms:php>
<cms:set_flash name='success_msg' value='1' />
<cms:dump />
</cms:if>
$activation_key="<cms:show k_member_activation_link />";