Answer the question
In order to leave comments, you need to log in
How to send mail with PHPMailer through a remote server?
Good afternoon. A question. There is a site where mail is sent by the PHPMailer 5.2.4 library through a local smtp server. For a number of reasons, the site owners decided to transfer their mail (to which letters from the site go) to mail.ru, the hosting admin claims that the mx record of the domain has been rewritten to the mail.ru server
. In order to send mail through a remote server, the code was given in the following view:
$mail = new PHPMailer;
$mail->CharSet = 'UTF-8';
$mail->Host = 'smtp.mail.ru';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = 'ourpassword';
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
Answer the question
In order to leave comments, you need to log in
These are the SMTP server settings. Show the code that calls the send email function.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question