My site sends out automated emails (such as a 'reset your password' email when a user forgets their password). Everything was working fine but I switched across to a new server which uses Plesk instead of cPanel (like my old one).
I set up all the email accounts that send out emails again but now only some of the emails work. My work email, gmail and hotmail are all fine but if I try to send an email to my friends email it cant send it.
I have noticed that my friends domain (the one he uses for the email) is registered with 1and1 which is the same company I have my server through, could the fact that the domain the email is being sent from and to have the same nameservers stop the email being sent?
I have checked my sendmail path which is:
/usr/sbin/sendmail -t -i and the one in my phpmailer is /usr/sbin/sendmail
I'm not sure what the -t -i means but I assume they're the same?
The SMTP path in my phpinfo is localhost so should I be setting my phpmailer host as localhost or smtp.mydomain.com?
Also my settings for sending my mail are:
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "localhost"; // SMTP server
$mail->SMTPAuth = true;
$mail->Username = "email@example.com";
$mail->Password = "PaSsWoRd";
$mail->From = "firstname.lastname@example.org";
$mail->FromName = "Password Reset";
$mail->Subject = "Password Reset";
Is all of this correct for using phpmailer on Plesk with qMail?;