· 10 years ago · Jun 17, 2016, 07:18 AM
1$mail->Host = 'smtp.host.net'; // SMTP server example
2$mail->SMTPDebug = 3; // enables SMTP debug information (for testing)
3$mail->SMTPAuth = true; // enable SMTP authentication
4$mail->Port = 465; // set the SMTP port for the GMAIL server
5$mail->SMTPSecure = 'ssl';
6$mail->Username = 'user'; // SMTP account username example
7$mail->Password = 'password'; // SMTP account password example
8
9$mail->setFrom('emailaddress at domainname.com','Mailer');
10//$mail->FromName = 'Mailer';
11$mail->addAddress('xxxxxx at gmail.com');
12
13$mail->Subject = 'Here is the subject';
14$mail->Body = 'This is the HTML message body in bold!';
15$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
16
17$mail->send();
18
19?>