550 5.7.1 Client does not have permissions to send as this sender (office365)

前端 未结 5 1186
时光说笑
时光说笑 2021-01-03 23:38

i m trying to send email with following configuration

Host: smtp.office365.com

port: 587

user: \"myemail@domain.com\"

pass: \"mypassword\"

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-04 00:18

    Answer provided by Luis Cruz is the right one.. However, I will try to be more descriptive though,

    We were trying to send mail in Mantis Bug Tracker through Office 365 account and were facing the same issue. Below was the config,

    $g_enable_email_notification = ON;
    $g_phpMailer_method          = PHPMAILER_METHOD_SMTP;
    $g_smtp_host                 = 'smtp.office365.com';
    $g_smtp_username             = 'abc@acme.com';
    $g_smtp_password             = '****';
    $g_smtp_connection_mode      = 'tls';
    $g_smtp_port                 = 587;
    

    Clearly what we were missing was the 'from' property. Adding following properties resolved the issue,

    $g_from_name               = 'Mantis Admin';
    $g_from_email              = 'abc@acme.com';
    $g_return_path_email       = 'abc@acme.com';
    

提交回复
热议问题