Menu

Notificactions using Office365

Dickinson
2021-05-06
2021-05-17
  • Dickinson

    Dickinson - 2021-05-06

    Hi iTop guys,

    I'm trying to use an O365 account for notification but it doesn't work. I
    haven touched my php.ini yet because I'm configuring config-itop.php file.
    What I have there is:

    'email_transport' => 'PHPMail',
    'email_transport_smtp.encryption' => 'tls',
    'email_transport_smtp.host' => 'smtp.office365.com',
    'email_transport_smtp.password' => 'xxxxxxxx',
    'email_transport_smtp.port' => '587',
    'email_transport_smtp.username' => 'xxxxxx@xxxxxxx',

    The test page fails and if I test by creating a change which triggers an
    email notification it nevers arrives. On the log I see:

    IssueLog
    2021-05-05 23:33:40 | Warning | Email sending failed: Some recipients were
    invalid, aFailedRecipients contains: xxxxxx@xxxxxx | IssueLog
    2021-05-06 00:05:08 | Warning | Email sending failed: Some recipients were
    invalid, aFailedRecipients contains: xxxxxx@xxxxxx | IssueLog
    2021-05-06 00:05:44 | Warning | Email sending failed: Some recipients were
    invalid, aFailedRecipients contains: xxxxxx@xxxxxx | IssueLog
    2021-05-05 17:30:53 | Warning | Email sending failed: Some recipients were
    invalid, aFailedRecipients contains: xxxxxx@xxxxxx | IssueLog

    All are valid and tested email addresses. In fact, the email address Im
    using in the one that I usefor notifications in other platform (zabbix)
    where it works perfectly.

    Any ideas?

    Eduardo from Colombia

     
  • Dickinson

    Dickinson - 2021-05-10

    Hi guys, appreciate your help

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-05-10

    What kind of email notifications are being sent?
    If on a ticket, you can click the notifications tab and see the details

     
  • Dickinson

    Dickinson - 2021-05-10

    Thanks for you replay Jeffrey, basically I have a trigger which sends an email when a new Change was created. It used to work fine with my old Exchange on premise, but it no longer exists and now we have all our email accounts in O365.

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-05-11

    Can you show how you configured the notifications?

     
  • Dickinson

    Dickinson - 2021-05-11

    Dear Jeffrey, what I have in the config-itop.php file is.

    'email_transport' => 'PHPMail',
    'email_transport_smtp.encryption' => 'tls',
    'email_transport_smtp.host' => 'smtp.office365.com',
    'email_transport_smtp.password' => 'xxxxxxxx',
    'email_transport_smtp.port' => '587',
    'email_transport_smtp.username' => 'xxxxxx@xxxxxxx',

    Thanks for your help

     
  • Brian C.

    Brian C. - 2021-05-13

    Jefferey,

    Mine is exactly like yours EXCEPT this line:
    'email_transport' => 'smtp'

    Works like a champ for me....

     
  • Dickinson

    Dickinson - 2021-05-14

    Briac, your're the one!! The email transport was the trick. Now my notificacions using an O365 account work like a charm. For those who may need this in the future, that's my final config:


    // email_default_sender_address: Default address provided in the email from header field.
    // default: ''
    'email_default_sender_address' => 'XXXXXXX@XXXXXXXX',

    // email_default_sender_label: Default label provided in the email from header field.
    //  default: ''
    'email_default_sender_label' => 'WHAT YOU WANT TO SEE',
    
    // email_transport: Mean to send emails: PHPMail (uses the function mail()) or SMTP (implements the client protocol)
    //  default: 'PHPMail'
    'email_transport' => 'SMTP',
    'email_transport_smtp.encryption' => 'tls',
    'email_transport_smtp.host' => 'smtp.office365.com',
    'email_transport_smtp.password' => 'xxxxxxxxx',
    'email_transport_smtp.port' => '587',
    'email_transport_smtp.username' => 'xxxxxxxxxxxx',
    

    Then just restart IIS and enjoy

    Thanks a million.

    Eduardo

     
    • Pierre Goiffon

      Pierre Goiffon - 2021-05-17

      Thanks for sharing this !

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.