Amazon ses and Mailgun [fixed]

Igor

New Member
Hello,
I have my amazon ses account and about 100 verified domain in account. But when im try to setup sending domain amazon ses web api i can setup only one email from my ses account.
Do you know any way how i can use all my domains and any emails from my domains?

same problem i have with my Mailgun account. I have about 50 domains but can use only one "from" email. From address in my campaing was ignored when im try send and used only from email from sending domain settings
 
Last edited:
@Igor - If you are using Mailwizz >= 1.3.6.5 you can set the FORCE FROM flag from the delivery server settings to NEVER.
This way the email from the campaign will be used. Keep in mind that if you do so, mailwizz cannot check if your email/domain is verified at amazon, it simply assumes you know what you are doing.
 
Thanks it work with amazon ses, but not work with Mailgun. When im try to send from mailgun system is used main domain from sending server default settings.
 
@Igor - That should not happen, can you look in the email source and see if the X-Sender header has the right email address, that is, the one from campaign or the one from server settings ?
 
X-sender has correct from address. For example this email manager4@mycampaigndomain.com address (this address im setup in campaign setting) but in field Sender:
i can see somethig like this manager4=mycampaigndomain.com@defaultdomain.com (@ was replaced to "=") and defaultdomain.com - its domain from my sender server setting
 
@Igor - The reason why i asked you about the X-Sender is because whatever value that has, is the same value as the mailwizz sets the FROM., so if the x-sender is a@a.com then it means has set the from as a@a.com as well.
 
Yes, but becouse "Sender" filed diferent i can see my email in my corporaitive emailbox (Outlook client) like
"manager4=mycampaigndomain.com@defaultdomain.com sent from name manager4@mycampaigndomain.com"
and this email go to spambox in main ESP. Its problem only in Mailgun, not in Amazon SES.
 
If you are using Mailwizz >= 1.3.6.5 you can set the FORCE FROM flag from the delivery server settings to NEVER.
This way the email from the campaign will be used. Keep in mind that if you do so, mailwizz cannot check if your email/domain is verified at amazon, it simply assumes you know what you are doing.

What about with Older version of Mailwizz, can we use this with API server of Amazon ?
 
im setup NEVER fo Аmazon and Mailgun. Its help for Аmazon but dont help for Mailgun (as im wrote befor in Sender filed in Mailgun header i have wrong info). I have no older version of Mailwizz and i think its not good idea with downgrade :)
 
I thing the promblem in this code
/mailwizz/apps/common/vendors/Composer/vendor/mailgun/mailgun-php/src/Mailgun/Mailgun.php
line 36

if(is_array($postFiles)){
return $this->post("$workingDomain/messages", $postData, $postFiles);
}

i think $workingDomain its domain from default sender setting of sending service but not from my campaing settings
Do you you have any idea how i can send post request to domain from campaign settings?
 
I am find the way how you can repair it (if someone have a similar problem) you just need to replace a couple of line in the
/mailwizz/apps/common/models/DeliveryServerMailgunWebApi.php
just you need to add green line and comment grey

$myhost=substr($fromEmail, strpos($fromEmail, "@")+1); //crete host from email

if (!empty($params['onlyPlainText']) && $params['onlyPlainText'] === true) {
unset($message['html']);
}

//$result = $this->getClient()->sendMessage($this->hostname, $message); //bugged version
$result = $this->getClient()->sendMessage($myhost, $message); //my fix
} else {
//$result = $this->getClient()->sendMessage($this->hostname, $message, $this->getMailer()->getEmailMessage($params));
$result = $this->getClient()->sendMessage($myhost, $message, $this->getMailer()->getEmailMessage($params)); //my fix
}
 
Last edited:
@Igor - the problem with this approach is that when you create the delivery server you create the hooks for one domain, the one from the FROM but if you later send from other from address, then you don't have webhooks for that domain so bounces/complaints/etc will not be processed.
 
in mailgun API you need to send post request in the url where sending domain name locate in the path of this url (/$workingDomain/messages) but in Mailwizz software its not supported
In this case my main problem send emails from all my domains in mailgun correctly (DKIM, corrrect filed "Sender" in header). For webhooks im use another script. But if someone need automaticly setup webhooks you just need replace another line in /mailwizz/apps/common/models/DeliveryServerMailgunWebApi.php script
just replace $this->hostname to $myhost
 
in mailgun API you need to send post request in the url where sending domain name locate in the path of this url (/$workingDomain/messages) but in Mailwizz software its not supported
In this case my main problem send emails from all my domains in mailgun correctly (DKIM, corrrect filed "Sender" in header). For webhooks im use another script. But if someone need automaticly setup webhooks you just need replace another line in /mailwizz/apps/common/models/DeliveryServerMailgunWebApi.php script
just replace $this->hostname to $myhost

sounds like a great idea, what do you say @twisted1919 , can this be made an option in the next version?
 
Back
Top