php - rfc822 email content inside the subject
Get the solution ↓↓↓using Gmail API with PHP and curl, I have that :
$message = "To: [email protected]\r\nFrom: [email protected]\r\nSubject: thesubject\r\n The message";
$ch = curl_init('https://www.googleapis.com/upload/gmail/v1/users/me/messages/send');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: Bearer ".$access_token,
'Accept: application/json',
'Content-Type: message/rfc822'
));
curl_setopt($ch, CURLOPT_POSTFIELDS, $message);
$data = curl_exec($ch);
curl_close($ch);
It is working very well, the email arrives with the subject. BUT only the subject, not the content ("The message"). Does someone know where the content is gone ? How could I do not changing all that script ? Thank you very much
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: err_ossl_pem_no_start_line
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.