I am new in mailgun.
I just create mailgun account. And verified new DNS.
SMTP Hostname
smtp.mailgun.org
Default SMTP Login
postmaster#example.com
Default Password
e1dfdse34343wewe3232323232323wewewewe
API Base URL
https://api.mailgun.net/v3/example.com
API Key
key-53234545453trter334233e
Of course current some value is dummy value. And I create new route.
Recipient : demo#example.com
Of course I set actions. Like this: https://example.com/message
I thought when I send the email via mailgun, then any user can reply with this email.
demo#example.com
But I cannot send the reply email. In a nutshell I can send email, but cannot accept any email.
Not sure am I wrong.
I searched lots of methods, but all are speaking enable.
Not sure what am I missing.
Please let me know if you know on this.
Thanks.
I fixed this myself. This was simple issue. I set the MXA priority as 10. So it arouse the google. That is why I cannot receive any Email. I hope anyone will not meet this problems if he read this. Thanks.
Related
I set up my mailgun account and was trying to use the sandbox domain to test sending email using API and not smtp. This is how my Laravel .env file was set up
MAIL_MAILER=mailgun
MAILGUN_DOMAIN=sandboxxxxxxx.mailgun.org
MAILGUN_SECRET=xxxxxxxxx
MAILGUN_ENDPOINT=api.mailgun.net/v3/<mailgun-domain>
Then I was using this in my controller to send the email.
$emailToSendTo = Page::where('name', 'contact')->first()->email;
Mail::to($emailToSendTo)->send(new ContactSent($request));
My email is not being sent as I look into the mailgun dashboard. I am also not getting any error message. Also I know that mailgun restricts the emails you can send to in the sandbox domain to what you set up in mailgun. The $emailToSendTo is a verified email.
The ContactSent class has been set up fine with the blade view.
I'm going to answer my own question so it helps someone.
I put this inside vendor/laravel/src/Illuminate/Mail/Transport/MailgunTransport.php and the method send():
dd($this->endpoint);
Then I tried to call the method which sends mail. I noticed that the MAILGUN_ENDPOINT was not set up properly therefore dd($this->endpoint) showed me the wrong endpoint.
It should be:
MAILGUN_ENDPOINT=api.mailgun.net
This solved my issue. I hope this will help someone debug. Also I really think that the environment variable should be named MAILGUN_BASE_URL as it confused the crap out of me.
I have a website with a webform which users can use to contact a company. The webform internally creates an email in PHP using PHPMailer and is sending this email via SMTP to the company.
The company has a customer-management-system which identifies the user by looking at the sender of the email. Which means I couldn't send the email from the form from "form#example.com" to "customer-relations#example.com", but need to send it from "customeremail#customerdomain.com" to "customer-relations#example.com".
This worked for some years now, but since some time, we get the error-message:
"envelope sender not allowed customeremail#customerdomain.com"
for example from emails from #gmail.com. Other domains still work.
I understand that it is not good practice to "fake" the sender of the email to make the identification of the customer-management-system work. The developer of the customer-management-systems are not able to offer a solution yet (no comment on that...), so perhaps there are any ideas here which we could try to make this work?
How can I get the Laravel Mail class response?
I am working with Sendgrid and I know that when I "ask" it to send an email it gives me back a MSGID and I would like to get it to keep in my database but the Laravel Mail class does not give any response!
Somebody knows how to do that?
---------------- EDITING FROM HERE
Actually I am gonna improve my question =)
I need to work with webhooks to know when the e-mail is delivered, opened and clicked!
How can I link the webhook received from Sendgrid with the emails on my "sent_mails" database table?
By the Sendgrid Panel I find a MSGID that is equals for every action from a specific e-mail but I don't have that ID on my base to link it!
Good news!
For SendGrid at least just found a good solution!
We can add custom fields when send an email and those fields will be on the webhook sent from SenGrid to you application!
So you can add a custom field with the ID of your record and it will be on the post data sent back to you by webhook =)
https://sendgrid.com/docs/Integrate/Frameworks/laravel.html
Easy!! Hope it helps someone else as well!
Can someone please explain how Magento(1.9.0) email sending works. I can't seem to find where the file for sending email from a contact form is. I see that the action attribute of the form points to "contacts/index/post/" but I can't seem to trace it.
Also cannot find the mail log or the which module or service magento uses to send the email itself.
I am trying to use external smtp server for multisite Magento and I need to do some custom logic and not some extension.
Please go to app\code\core\Mage\Contacts location to see all the logic of contact.
It is used to send email or anything related to contact.
Also, if we want to change any contact settings then go to system> configuration> contacts(under general tab).
Let me know if anything else you need to know.
Cheers!!
I am trying to send email using Mandrill API, but I am getting response as below:
{
"email":"_emailid_",
"status":"rejected",
"_id":"967859c539b1416abc2613b5a3619a46",
"reject_reason":"invalid-sender"
}
I am sending the mail by hitting curl call on mandrill api like here.
Can somebody tell me what might be reason for the rejection ?
It's been a long time this question was posted, but I guess I still can contribute.
I had the same issue this week when using MailChimp Transactional API calling a POST method through the command
curl -X POST
https://mandrillapp.com/api/1.0/messages/send-template
-d '{"key":"","template_name":"","template_content":[],"message": etc... }
and I got the error message :
[{"email":"some_name#gmail.com.br","status":"rejected","_id":"2bff316436814a399fafea22fda4a4dd","reject_reason":"recipient-domain-mismatch"}]
Asking MailChimp's support team about this, they reply , after a couple of days, the following :
The recipient domain mismatch reject reason is specific to demo and trial accounts and refers to a limitation in those accounts. Sending is restricted to the domains you have set up in the account already. This means your recipient would need to be on a domain that you have the same setup as mentioned for your sending address. If you change to a paid account, this restriction would be removed automatically and you could send to any recipients. Plainly put, you can only send to domains you have verified/authenticated on the demo mode.
I use a free account. I search the documentation and several other sources in the internet but I found no reference to this free account limitation.
It would be very productive if such limitation was explicitly put.
The good news is that your API key is fine. The bad news is that you probably need to configure the email sender domain so that mandrill knows the sender is valid.