Specify another domain for smtp and elmah?
I got kinda a weird scenario. I am using google apps for my domain emails so I get chobo2@mydomain.com.
I am using this instead of the my shared hosting provides email server because this gives me alot of flexibility to switch to a new hosting site and not have to transfer all my emails when I switch over. I also like using it over the one my host provides(on average I get emails faster).
Now the only downside to all this is gmail has alot lower email limit(I think like 500 a day). Where as my hosting provider allows something like 1000 an hour.
So I use google apps for my emails that I want to look at and the hosting email servers for automated messages.
What leads me to this problem
<errorMail from="noreply@mydomain.com"
to="myGoogleApssEmail@mydomian.com"
subject="Failed"
async="true"
开发者_开发技巧 smtpPort="25"
smtpServer="mail.mydomain.com"
userName="noreply@mydomain.com"
password="password" />
So when an elmah error occurs it should send me an email.This email gets sent through my hosting email servers but it should go to my email address that I have with google(remember they both have the same end domain name - mydomain.com).
I never get the email and I think it is because it probably thinks that they are on the same servers. So instead of sending it to google it probably goes well it must be on the same server as this domain lets try to send it there.
Any ideas on how to fix this? Is it even possible?
It is not possible as MX records are meant to be per domain not per e-mail address. So if mydomain.com is using Google MX servers all e-mails will be delivered to google in the first place. There you could create forwarding rules to your hosting provider but it does not make sense as it would exceed the limit, too.
What you could do is specifying subdomains - i.e. elmah.mydomain.com plus an MX pointing to your provider.
精彩评论