发送没有凭证的邮件 [英] send mail without credential

查看:109
本文介绍了发送没有凭证的邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的asp.net应用程序中存在问题。我使用SMTP服务器凭据发送电子邮件。它包括主机名smtp.gmail.com,端口号= 587,用户名=somemai ... @ gmail.com密码=。我创建了一个邮件消息对象,并将from和to地址设置为fr ... @ gmail.com,t ... @ gmail.com。我收到了电子邮件,但是id始终被视为用户名,即somemai ... @ gmail.com。怎么回事?如何将电子邮件地址更改为fr ... @ gmail.com?

I have an issue in my asp.net application. I am using SMTP server credentials to send emails. It includes a hostname smtp.gmail.com, port no=587, username="somemai...@gmail.com" password="". I have created a mail message object and set the from and to address to "fr...@gmail.com","t...@gmail.com". I am getting emails, but the from id is always taken as the username ie,somemai...@gmail.com. How it happens? How can I change the email address to fr...@gmail.com?

推荐答案

您无法更改它。最后我查了一下,GMail不允许你设置From地址与用来发送的帐户不同。
You can't change it. Last I checked, GMail doesn't allow you to set the From address different from the account that's being used to send.


我相信唯一真正的方法是找到一个打开用于发送电子邮件的SMTP中继。

这不需要任何形式的身份验证,因此可以将电子邮件发送给任何您想要的人。
I believe the only real way to do this would be to find an open SMTP relay to use to send the e-mail.
This would not require any form of authentication and so would be able to send the e-mail as being from whoever you wish.


这篇关于发送没有凭证的邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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