require_once 'google/appengine/api/mail/Message.php'; use google\appengine\api\mail\Message;
// ... $message_body = "..."; $mail_options = [ "sender" => "[email protected]", "to" => "[email protected]", "subject" => "Your example.com account has been activated.", "textBody" => $message_body ]; try { $message = new Message($mail_options); $message->send(); } catch (InvalidArgumentException $e) { // ... } I have used the above code for sending email from Google Apps Engine(for PHP Hosting)and its is working successfully. But i need a mail send to formatted email address like *Contact Name <[email protected]>* I have try with the following code but it is not working and i got exception 'InvalidArgumentException' with message 'Invalid 'to' recipient: <[email protected]>' $mail_options = [ "sender" => "[email protected]", "to" => "Contact Name <[email protected]>", "subject" => "Your example.com account has been activated.", "textBody" => $message_body ]; and $mail_options = [ "sender" => "[email protected]", "to" => "Contact Name <[email protected]>", "subject" => "Your example.com account has been activated.", "textBody" => $message_body ]; Is it possible? -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
