From cf83ba97bdb951e769a39d882ae279bd821acf99 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Tue, 1 Aug 2023 20:32:03 -0600 Subject: [PATCH] Add more info and stuff to receipt email --- source/static/payshipment.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/static/payshipment.php b/source/static/payshipment.php index 318e731..3eefea7 100644 --- a/source/static/payshipment.php +++ b/source/static/payshipment.php @@ -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();