使用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.