slamkajs
Forum Replies Created
-
Here is the gist of my email generation.
// SET EMAILS $from_email = $_POST["email"]; $to_email = $_POST["toEmail"]; $subject = "Contact Request from ..."; $headers = ["From: " . $_POST["firstName"] . " " . $_POST["lastName"] . " <" . $from_email . ">"]; $sent = wp_mail($to_email, $subject, "body content for email", $headers);I can see when debugging through the Mailgun engine that my header’s FROM email address and name are found. The issue is Mailgun’s engine does not give a condition to keep or overwrite the FROM email address. It implements the POST SMTP Mailer’s FROM email address every time. I am looking for it to check if a FROM email address already exists and if it does then it should NOT use the plugin’s FROM email address.
im completely aware of the dangers involved in modifying the code. Even if the changes are valid, updating the plugin erases the change.
The goal I am trying to accomplish does not involve monitoring if an email was sent, I have an external application which monitors incoming mall communications via Mailgun. The main issue I have is I want to be able to specify the FROM address. The Sendinblue engine already allows for the overwriting of the FROM email address, but Mailgun engine does not.