情况:
这个问题到底是关于什么的?我在做什么?
我正在使用PHP GMAIL-API发送电子邮件(e-mails)。
我如何发送电子邮件?
$contenido="Whatever <span style="color:green;">and</span> then 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";
// The message needs to be encoded in Base64URL
$mime = rtrim(strtr(base64_encode($strRawMessage), '+/', '-_'), '=');
$msg = new Google_Service_Gmail_Message();
$msg->setRaw($mime);
//The special value **me** can be used to …
Run Code Online (Sandbox Code Playgroud) gmail ×1