声明中的内容omail.from ="? @ mydomain.com" [英] What goes in the statement omail.from="? @mydomain.com"

查看:131
本文介绍了声明中的内容omail.from ="? @ mydomain.com"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

得到GoDaddy的回答。代码是正确的。考克斯邮件拒绝来自Godaddy服务器的电子邮件。





我们没有从我们网站上的联系表格收到我们的电子邮件。电子邮件地址已更改,我正在努力确保它已正确完成。虽然我不是程序员,但我可以遵循代码。我看到oMail.To =正在将电子邮件发送到正确的地址。我的问题涉及oMail.From =语句。该领域应该是什么。我已经读过它应该是您的电子邮件地址或域名。如果是这样,它是否需要与oMain.To =行中列出的不同?



这是一个托管在GoDaddy上的网站,但是电子邮件存储在cox中商业邮件。



GOT the answer from GoDaddy. The code is correct. Cox mail was rejecting the emails coming from Godaddy servers.


We are not getting our emails from the contact form on our website. The email address had changed and I am trying to make sure it was done properly. Though I am not a programmer and I can follow the code. I see the oMail.To= is sending the email TO the correct address. My question concerns the oMail.From= statement. what is supposed to be in that field. I have read that it is supposed to be your email address or domain name. If so, does it need to be different than the one listed in the oMain.To= line?

This is a website hosted on GoDaddy but email is stored at cox business mail.

oMail = New System.Web.Mail.MailMessage()
            oMail.From = "webmail@Mybusiness.com"    THIS IS IN QUESTION
            oMail.To = "office@Mybusiness.com"
            oMail.Subject = "Mybusiness Web Request!!!!"
            oMail.BodyFormat = MailFormat.Html
            oMail.Priority = MailPriority.High
            oMail.Body = mybody
            SmtpMail.SmtpServer = server
            SmtpMail.Send(oMail)





我尝试了什么:



我尝试在两个地方使用相同的电子邮件地址我尝试在地点使用2个不同的电子邮件地址(我的都是)。两者都没有。



What I have tried:

I tried using the same email address in both locations and I tried using 2 different email address in the locations (both mine). Neither worked.

推荐答案

无需解决方案。代码是正确的。 from可以是您域中的任何电子邮件地址。这使托管服务器知道它是合法的电子邮件地址,并且可以发送。然后它会显示在您的电子邮件收件箱(oMail.To)中,其中oMail.From地址作为发件人(您的网站)。
No solution required. Code is correct. The "from" can be any email address within your domain. This lets the hosting server know that it is a legitimate email address and it is OK to SEND. It then shows up in your email inbox (oMail.To) with the oMail.From address as the sender (your website).


这篇关于声明中的内容omail.from ="? @ mydomain.com"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆