DMB Posted June 8, 2022 Share Posted June 8, 2022 Earlier i was able to send the mail through PHP code. But now it's not working. While debug, i came to know that we can't use gmail from 30th May onward. It's showing Less secure app access is not available from 30th May. Could you please tell what to do for sending mail through PHP. Quote Link to comment https://forums.phpfreaks.com/topic/314904-unable-to-send-mail/ Share on other sites More sharing options...
DMB Posted June 8, 2022 Author Share Posted June 8, 2022 Please find the attached code which was working earlier, but now it's not working. Hence unable to send the mail. Please help me out to fix this issue. Quote Link to comment https://forums.phpfreaks.com/topic/314904-unable-to-send-mail/#findComment-1597115 Share on other sites More sharing options...
ginerjm Posted June 8, 2022 Share Posted June 8, 2022 Usually code is posted as CODE, not a picture. Makes it easier to read and to perform edits on it should we have something to help you. Quote Link to comment https://forums.phpfreaks.com/topic/314904-unable-to-send-mail/#findComment-1597116 Share on other sites More sharing options...
mac_gyver Posted June 8, 2022 Share Posted June 8, 2022 you need to use oauth authentication. here's a phpmailer page - https://github.com/PHPMailer/PHPMailer/wiki/Using-Gmail-with-XOAUTH2 Quote Link to comment https://forums.phpfreaks.com/topic/314904-unable-to-send-mail/#findComment-1597117 Share on other sites More sharing options...
DMB Posted June 8, 2022 Author Share Posted June 8, 2022 Attached the code mail_function2.txt Quote Link to comment https://forums.phpfreaks.com/topic/314904-unable-to-send-mail/#findComment-1597120 Share on other sites More sharing options...
ginerjm Posted June 8, 2022 Share Posted June 8, 2022 Again - we POST the code. People dont like to click links to places they don't know. Please use the <> icon to post it neatly. Of course Mac_gyver may have already solved your problem for you. Quote Link to comment https://forums.phpfreaks.com/topic/314904-unable-to-send-mail/#findComment-1597121 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.