vendredi 20 octobre 2023

socketlabs not working without plainTextBody

This is working fine but when I am sending without plainTextBody then its not working I need to use without plainTextBody, I need to set just subject and htmlBody .

When I am working without plainTextBody then its not working.

$message->subject = "Simple Html file with text";
$message->plainTextBody = "This is the Plain Text Body of my message.";
$message->from = new EmailAddress("from@example.com");
$message->addToAddress(new EmailAddress("recipient1@example.com", "Recipient #1"));

//Get html content from a file
$pathToHtmlFile = __DIR__ .'../../../ExampleCode/Html/SampleEmail.html'; 
$message->htmlBody = file_get_contents($pathToHtmlFile);
 
//Send the message
$response = $client->send($message);

I am using this one https://www.socketlabs.com/api/ but I do not want to use plainTextBody in our project.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/ANl2wmO
via IFTTT

Aucun commentaire:

Enregistrer un commentaire