Add more info and stuff to receipt email

master
Skylar Ittner 9 months ago
parent b7d8c60ac3
commit cf83ba97bd

@ -94,13 +94,22 @@ try {
$mail = new Email();
$emailsettings = $_SETTINGS["email"];
$mail->setSMTP($emailsettings["server"], $emailsettings["port"], true, $emailsettings["user"], $emailsettings["password"], $emailsettings["security"]);
$mail->setFrom("certifiedfromhome@helena.express", "CertifiedFromHome.com");
$mail->setFrom($emailsettings["user"], "CertifiedFromHome.com");
$mail->addTo($shipment->from_address->email);
$mail->setSubject("Your CertifiedFromHome Receipt");
$body = "Thanks for using CertifiedFromHome.com!\r\nYour card has been charged a total of $" . number_format($price, 2) . ".\r\n";
if (!empty($shipment->options->certified_mail)) {
$body .= "You can track your letter with this tracking code: " . $shipment->tracking_code . "\r\n";
$body .= "Or click here: https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=" . $shipment->tracking_code . "\r\n\r\n";
}
if (!empty($shipment->options->return_receipt)) {
$body .= "You purchased an electronic return receipt. To request one, go to the link above, "
. "make sure the tracking says \"Delivered\", "
. "scroll down and click on \"Return Receipt Electronic\", and fill in the form. USPS will "
. "email you a PDF proof of delivery with the recipient's signature and other info.\r\n\r\n";
}
$body .= "Here's a link to your purchased postage, just in case: https://certifiedfromhome.com/pdf/" . $pdffile
. " Please note that while you can print it more than once, mailing multiple copies is illegal.\r\n";
$body .= "If you need any help, just reply to this email. Thanks again!";
$mail->setBody($body);
$mail->send();

Loading…
Cancel
Save