Email Notification via OAuth2
Email Notification via OAuth2
Current I see the following email methods PHPMail() Sendmail SMTP
I'm running Version 1.2.26 Maybe this has been asked before, but so many email providers are looking for stronger security to send emails, having access to OAuth would be nice. I do see in the /cacti/include/vendor/phpmailer/src has a OAuth.php method, but not sure how to configure it in Cacti. I do have access to microsoft graph api (codes and token)
Thanks for raising this. We will look into it.
So, which example works better for you option1 or option2?
https://github.com/PHPMailer/PHPMailer/blob/master/examples/gmail_xoauth.phps
Lines 54++ in that file.
I think option 1 looks better, I think it could be modified to allow for Office 365 and then a call to lookup a stored token that is refreshed every hour
Thank you,
Eric C
From: TheWitness @.> Sent: Wednesday, July 31, 2024 5:30 PM To: Cacti/cacti @.> Cc: bdin1 @.>; Author @.> Subject: Re: [Cacti/cacti] Email Notification via OAuth2 (Issue #5739)
So, which example works better for you option1 or option2?
https://github.com/PHPMailer/PHPMailer/blob/master/examples/gmail_xoauth.phps
Lines 54++ in that file.
— Reply to this email directly, view it on GitHub https://github.com/Cacti/cacti/issues/5739#issuecomment-2261565764 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQDIQ54RRH4VRBZV5OMC53ZPFQQBAVCNFSM6AAAAABHDZLDDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRRGU3DKNZWGQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AOQDIQ4NSHZG27KX76FEKK3ZPFQQBA5CNFSM6AAAAABHDZLDDCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUGZTAUI.gif Message ID: @.*** @.***> >
@bdin1,
Just looking at this. It's painful as there are so many settings to preserve, but it's also pretty strait forward. I'm on vacation this week, but will start to rough this in next week.
Larry
Have you been able to spend any time here yet @xmacan? I'm going through issues this week since I won't have dev access.
I'll do it in the next few days
I've installed 1.3.0 - Dev f09d5b2a on a test system to see about using Oauth2, I have a process already gets a token. We also use Microsoft as our mail provider
Please wait few days. I'm working on it but I was busy. It is PR https://github.com/Cacti/cacti/pull/6024
@bdin1 If you have token, you can use code from this PR now. I have tested it with google and it is working. I have only one issue with get token directly from cacti
I did see that link, just not a way to use a token. Maybe I am missing something on how to use the OAuth2 process
Once the pull request is merged into the development Branch then there should be full oath2 to support including renewing your tokens. @xmacan and I are negotiating as to how to move forward to get this into the develop branch sooner than later.
wonderful, thank you
@bdin1 Okay, the pull request is in. We have some issues, but we will handle them under QA. Please test and open issues as you find them.
I will close this as completed now. Open new tickets like I said when you run across issues.