I am trying to use google-api-php-client and gmail-api to allow my users to authenticate their gmail accounts and send emails through my website. I asked a more generic questions earlier and decided to seek help from the PHPMailer community with this question.
I have used PHPMailer to send emails. And I want to know if I can extract the raw rfc822 message from my PHPMailer object after setting it up prior to sending. I should be able to then do a base64_encode on that string and set the "raw" property for my Google_Service_Gmail_Message.
No problem: Set up everything as if you were going to send, but instead of calling send()
, call preSend()
, then fetch the complete message using getSentMIMEMessage()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With