使用Outlook中的“发件人地址"和“默认地址"发送电子邮件 [英] Sending Emails with a different From Address then the Default Address in Outlook

查看:164
本文介绍了使用Outlook中的“发件人地址"和“默认地址"发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个客户,我需要我代表他们发送一些电子邮件,但是如果我不使用我的默认电子邮件地址,它将对我不起作用. (他们不想要)是否有一种方法可以使用我的默认电子邮件发送电子邮件,但是发件人发送时将发件人地址"显示为客户地址?

该代码目前对我有效,但仅在使用默认电子邮件时才有效....

I have a customer that needs me to send out some emails on their behalf but it will not work for me if I do not use my default email address. (which they do not want)Is there a way to send the emails using my default email but have the From Address appear as the customers address when it gets delivered?

This code is currently working for me but will only work using the default email....

Dim SendEmail As New SendEmail
Dim SendTo As String = emailaddress
Dim FileAttach As String
Dim strSubject As String
Dim strMessage As String
      
Const c As String = "<br>"
Const d As String = "<a href=" & " hold=" />Dim f As String = txtEmailFromAddress.Text<br mode="> "
Dim h As String = txtEmailFromAddress.Text
Const i As String = "</a>"
Dim j As String = d & f & g & h & i 'this is to attach a link to email <a href="mailto:info@anywhere.com">info@anywhere.com</a>
Dim RequestedBy As String

If Len(txtRequestedBy.Text) >= 1 Then
    RequestedBy = txtRequestedBy.Text
Else
    RequestedBy = txtEmailFromAddress.Text
End If

Dim SITMessagetxt1 As String
SITMessagetxt1 = "This email has been forwarded to you by anywhere at the request of  " & RequestedBy & "  " & c & "Any replies, questions or concerns regarding this email should be directed to " & j & " " & c & " " & c & ""
SITMessagetxt1 = "<p><font face="Arial" size="1">" & SITMessagetxt1 & "</font></p>"
FileAttach = ""
strSubject = txtEmailSubject.Text
strMessage = SITMessagetxt1 & txtEmailMessage.Text  'The body encoding is set to HTML 
SendEmail.SendEmailMessage("info@anywhere.com", SendTo, strSubject, strMessage, FileAttach)


任何帮助将不胜感激.
Christine


Any help would be greatly appreciated.
Christine

推荐答案

确保您的电子邮件服务器已设置为允许代表指定的电子邮件域转发.
Make sure your email server is setup to allow forwarding on behalf of the designated email domain.


这篇关于使用Outlook中的“发件人地址"和“默认地址"发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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