Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 642
  • Last Modified:

How to Force .SentOnBehalfOfName = "blah@blah.com"

How do I force the from portion of an email (SentOnBehalfOfName) to be a different email address then my default email address?
0
eossma
Asked:
eossma
  • 4
  • 3
1 Solution
 
Rey Obrero (Capricorn1)Commented:


where are the codes you are using ?


Set MyMail = MyOutlook.CreateItem(olMailItem)

     

       MyMail.SentOnBehalfOfName = "abc@xyz.com"
0
 
eossmaAuthor Commented:
So, this is a snippet of the code I have.  Everything works, but it's not sending it from the specified email address.  It ignores it.      

  If Not IsNull(rs("Email")) Then
          Set objMessage = objOutlook.CreateItem(olMailItem)
            With objMessage
                .To = rs("Email")
                .SentOnBehalfOfName = "blah@blah.org"
                .Subject = "ENROLLMENT REMINDER !  -  " & [CRSE] & " on " & [CourseDate] & ""
                .BodyFormat = olFormatHTML
                .HTMLBody = "<HTML><HEAD><TITLE></TITLE></HEAD><BODY><FONT face=Verdana><FONT size=2><STRONG><U>ENROLLMENT REMINDER</STRONG></U><BR><BR>You are scheduled to attend the class on <FONT color=#0000ff><b>" & [CRSE] & "</FONT></B> held <FONT color=#0000ff><b>" & [CourseDate] & "</FONT></B> @ " & [StartOfCourse] & " - " & [EndOfCourse] & ".<BR><BR><STRONG><U>IMPORTANT</U></STRONG></FONT></BODY></HTML>"
                .Importance = olImportanceHigh  'High importance
                .Save
            End With
        End If
0
 
Rey Obrero (Capricorn1)Commented:


 were you given delegate permissions to send mail on someone else's behalf?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
eossmaAuthor Commented:
Yes, I am the owner of this other email address.  Both default and this other email address are a part of my company's domain.
0
 
eossmaAuthor Commented:
any thoughts???
Please help.
0
 
eossmaAuthor Commented:
that answers my question.
thank you.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now