few days before my phpmailer function works fine but now it gives me this error
The following From address failed: email@example.com Mailer Error: The following From address failed: firstname.lastname@example.org
So, you deliver this script to your client? You use the client's gmail account to send mail through script?
If that is your case, all you have to do is tell your client to run the script one more time, and then a failure should occur again, instruct your client or whoever owned the email address to login to their google account. Upon successful login to the gmail account, wait for the red bar notification on top of the page, click this notification and confirm that they have knowledge of the server's IP sending an email and requesting an authorization using their gmail account credentials..
kind of like this...
server PHP MAIL---> initiate mail function -->use gmail account credential instead of the server's default -->data send to gmail for authentication-->
Authentication response--> true? email is sent
Authentication response--> false? SMTP server error: 5.5.1
I might have the wrong understanding about your question.