If you have gone through part 1 and done everything step by step then you are now ready to continue.
We had already created an instance as shown below 👇
After instantiation, now you are ready to create a mail inside your code. Copy the code below:
Let us now go through it step by step.
$mail->isSMTP(); is to allow you send the mail using SMTP.$mail->SMTPAuth = true; this is to enable SMTP authentication.$mail->SMTPSecure = 'tls' enable encryption, there are at least two types of encryption used by PHPMailer, PHPMailer::ENCRYPTION_STARTTLSand TLS encryption.$mail->Port = 587; TCP port to connect to, that is if you have used TLS encryption, if you have opted for`PHPMailer::ENCRYPTION_SMTPS` then use port 465$mail->isHTML(true); Sets an email format to HTML$mail->Username = 'vik03@username.ac.ke'; SMTP username, hosts email address$mail->Password = 'secret'; SMTP password, pass of hosts email.
That was the server setting, now let us move to part 3 and tackle the Recipients section Follow and share for more tech issues.Take your time and leave a comment. Thank you


Comments
Post a Comment