![]() ![]() $mail->FromName=“from name” AddReplyTo(), AddAddress() functions will accept array of email addresses, and name is optional. ![]() ![]() If(!$mail->Send()) echo “Problem sending email.” įor setting FromEmail and FromName, we can either use SetFrom()function or use PHPMailer properties PHPMailer::From and PHPMailer::FromName. $content ="This is a test email using PHP mailer class." $mail->Subject=“Test email using PHP mailer” $mail->AddReplyTo(“from email”,“PHPPot”) $mail->SetFrom(“Your from email”,“from name”) Use your Gmail Username and Password to send email. When we send email using Gmail SMTP make sure to set SMTPAuth as TRUE and SMTPSecure as tls/ssl. We should set subject, content and header information. It is sufficient to have only and of this library. Here is example of another method: PHP Script for Sending Email using Gmail SMTPįor sending email using SMTP we need not have entire PHPMailer library. $sbj = “Sending email using Scriptcase” //Subject I figure this out… I hope someone still needs help on this.Īll i had to do is change the port to 465 and add ‘S’ right after the port to make it SSL (Secure)… I am using the same username and password in my Outlook settings which is working. However when I set up my gmail account I get the following message: I have set up sc_mail using Vitors settings and it works. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |