PHPMailer not work

Website URL

https://astrateam.rf.gd/feedback

Error Message

SMTP code: 554; [email protected] not allowed to send as root@localhost - but i try to send SMTP with ‘SMTP Debug test’ and message sended - and i allow SMTP on outlook

Other Information

How admin says ‘func mail() in php not work becase it’s not security’ and i create SMTP with PHPMail but it’s not work too

this is send message PHP code:

    require_once('phpmailer/PHPMailerAutoload.php');
    $mail = new PHPMailer;
    $mail->CharSet = 'utf-8';

    $mail->Body = "test message";

    if ($mail->send()) {
        echo 'Send';
    } else {
        echo Error: ' . $mail->ErrorInfo;
    }

Hello!

Can you please share the code where you define the host, username, and password? Be sure to hide the password when you share.

Based on your error message, it does not look like your sending address is configured properly.

Thanks!

3 Likes

Thanks, i understand my problem - it’s be very funy error
before:
$mail->setFrom(‘smtp.office365.com’);

after:
$mail->setFrom(‘[email protected]’);

Can you please share the full code? One line with a placeholder input it not at all helpful.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.