<small id='JQxoa'></small><noframes id='JQxoa'>

        <tfoot id='JQxoa'></tfoot><legend id='JQxoa'><style id='JQxoa'><dir id='JQxoa'><q id='JQxoa'></q></dir></style></legend>

          <bdo id='JQxoa'></bdo><ul id='JQxoa'></ul>

        <i id='JQxoa'><tr id='JQxoa'><dt id='JQxoa'><q id='JQxoa'><span id='JQxoa'><b id='JQxoa'><form id='JQxoa'><ins id='JQxoa'></ins><ul id='JQxoa'></ul><sub id='JQxoa'></sub></form><legend id='JQxoa'></legend><bdo id='JQxoa'><pre id='JQxoa'><center id='JQxoa'></center></pre></bdo></b><th id='JQxoa'></th></span></q></dt></tr></i><div id='JQxoa'><tfoot id='JQxoa'></tfoot><dl id='JQxoa'><fieldset id='JQxoa'></fieldset></dl></div>
      1. 在c#中通过gmail发送邮件时更改发件人地址

        change sender address when sending mail through gmail in c#(在c#中通过gmail发送邮件时更改发件人地址)
        • <tfoot id='hoSvf'></tfoot>

            1. <i id='hoSvf'><tr id='hoSvf'><dt id='hoSvf'><q id='hoSvf'><span id='hoSvf'><b id='hoSvf'><form id='hoSvf'><ins id='hoSvf'></ins><ul id='hoSvf'></ul><sub id='hoSvf'></sub></form><legend id='hoSvf'></legend><bdo id='hoSvf'><pre id='hoSvf'><center id='hoSvf'></center></pre></bdo></b><th id='hoSvf'></th></span></q></dt></tr></i><div id='hoSvf'><tfoot id='hoSvf'></tfoot><dl id='hoSvf'><fieldset id='hoSvf'></fieldset></dl></div>
                <legend id='hoSvf'><style id='hoSvf'><dir id='hoSvf'><q id='hoSvf'></q></dir></style></legend>
              • <small id='hoSvf'></small><noframes id='hoSvf'>

                  <tbody id='hoSvf'></tbody>
                  <bdo id='hoSvf'></bdo><ul id='hoSvf'></ul>
                  本文介绍了在c#中通过gmail发送邮件时更改发件人地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我已使用以下代码使用 gmail 帐户从我的 Web 应用程序发送邮件.我的问题是,我可以将发件人地址更改为原始发件人(gmail)地址以外的其他地址吗?我的代码如下:

                  I have used the following code to send mail from my web application using a gmail account. My question is, can i change the sender address to another address other than original sender(gmail) address? My code is as follows:

                  System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
                  System.Net.NetworkCredential cred = new System.Net.NetworkCredential("sample@gmail.com", "*******");
                  

                  无论我做什么都是无用的,因为我总是收到来自 sample@gmail.com 的邮件.可以改吗?

                  Whatever i do is useless as i always receive mail from sample@gmail.com. Is it possible to change it?

                  我已经改成mail.From = new System.Net.Mail.MailAddress("sample@yahoo.com"); 但我收到了来自地址 sample@gmail.com 的邮件而不是来自新的发件人"地址.我认为 gmail smtp 会用原始凭据覆盖发件人地址.

                  I have changed to mail.From = new System.Net.Mail.MailAddress("sample@yahoo.com"); but i received the mail with the from address sample@gmail.com and not from the new "From" address. I think gmail smtp overwrites the from address with the original credential.

                  推荐答案

                  Gmail 不允许您将 FROM 更改为不同于您的 gmail 帐户的内容.

                  Gmail doesn't allow you to change the FROM to something different than your gmail account.

                  无论您使用什么,他们都会在转发之前覆盖它.这可以防止垃圾邮件/欺骗.

                  It doesn't matter what you use, they over-write it, before they relay it on. This prevent spamming/spoofing.

                  这篇关于在c#中通过gmail发送邮件时更改发件人地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Populate ListBox with a IEnumrable on another thread (winforms)(在另一个线程(winforms)上使用 IEnumrable 填充 ListBox)
                  listbox selected item give me quot; System.Data.DataRowViewquot; , C# winforms(列表框选择的项目给我quot;System.Data.DataRowView, C# Winforms)
                  Cannot remove items from ListBox(无法从列表框中删除项目)
                  Preventing ListBox scrolling to top when updated(更新时防止列表框滚动到顶部)
                  Drag and drop from list to canvas on windows phone with MVVM(使用 MVVM 在 Windows 手机上从列表拖放到画布)
                  Deselection on a WPF listbox with extended selection mode(具有扩展选择模式的 WPF 列表框上的取消选择)
                  <legend id='PmSEM'><style id='PmSEM'><dir id='PmSEM'><q id='PmSEM'></q></dir></style></legend>
                    <bdo id='PmSEM'></bdo><ul id='PmSEM'></ul>

                          <tbody id='PmSEM'></tbody>
                        <tfoot id='PmSEM'></tfoot>

                          <small id='PmSEM'></small><noframes id='PmSEM'>

                        1. <i id='PmSEM'><tr id='PmSEM'><dt id='PmSEM'><q id='PmSEM'><span id='PmSEM'><b id='PmSEM'><form id='PmSEM'><ins id='PmSEM'></ins><ul id='PmSEM'></ul><sub id='PmSEM'></sub></form><legend id='PmSEM'></legend><bdo id='PmSEM'><pre id='PmSEM'><center id='PmSEM'></center></pre></bdo></b><th id='PmSEM'></th></span></q></dt></tr></i><div id='PmSEM'><tfoot id='PmSEM'></tfoot><dl id='PmSEM'><fieldset id='PmSEM'></fieldset></dl></div>