GMAIL API removes my html attributes when sending -
the situation:
what question , doing?
i sending electronic mails (e-mails) php gmail-api.
how sending e-mails?
$contenido="whatever <span style="color:green;">and</span> img <img src='#' ... >"; $strrawmessage = "from: flauta <tallergranadosortiz@gmail.com>\r\n"; $strrawmessage .= "to: <".$paquien.">\r\n"; $strrawmessage .= 'subject: =?utf-8?b?' . base64_encode($sujeto) . "?=\r\n"; $strrawmessage .= "mime-version: 1.0\r\n"; $strrawmessage .= "content-type: text/html; charset=utf-8\r\n"; $strrawmessage .= 'content-transfer-encoding: quoted-printable' . "\r\n\r\n"; $strrawmessage .= $contenido."\r\n"; // message needs encoded in base64url $mime = rtrim(strtr(base64_encode($strrawmessage), '+/', '-_'), '='); $msg = new google_service_gmail_message(); $msg->setraw($mime); //the special value **me** can used indicate authenticated user. $objsentmsg = $service->users_messages->send("me", $msg); echo 'awesome.... stuff sent.'; are e-mails being sent?
yes.
but flowy stuff removing image... , not know why.
what receiving?
in mail receive plain tags without attributes.
in case: whatever <span>and</span> img <img>
do know if need encode content in other special way or something?
it fault because doing wrong.
but not fault not know doing wrong.
so there no fault @ all.
who talking fault anyways?
Comments
Post a Comment