Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

From field is blank in Outlook

Status
Not open for further replies.

cantina

MIS
Aug 30, 2004
14
US
Hello,

I have this script that emails me, but I can't seem to get it to fill in the From field in Outlook. I receive the message, but the From field is blank. When I open the message up, the From field is filled in properly, but when the message is listed in Outlook, the From field is blank. I'm using legitimate users in From field too. I know this sounds confusing, but if you have Outlook, then you'll know what I mean...

Here is the script:



Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.Sender = """user1"" <user1@company.com>"
objMessage.To = "user2@company1.com"
objMessage.TextBody = "This is some sample message text.." & vbCRLF & "It was sent using SMTP authentication."
objMessage.Configuration.Fields.Item _
(" = 2
objMessage.Configuration.Fields.Item _
(" = "10.0.0.21"
objMessage.Configuration.Fields.Item _
(" = cdoAnonymous
objMessage.Configuration.Fields.Item _
(" = 25
objMessage.Configuration.Fields.Item _
(" = False
objMessage.Configuration.Fields.Item _
(" = 60
objMessage.Configuration.Fields.Update
objMessage.Send


Script runs fine, but I wondering if I'm missing something, or is this the inherent nature of SMTP relaying.

Thanks all,
Cantina
 
Hello cantina,

Have you tried to fill in the .from field?
[tt]
objMessage.from = "me@company.com"
[/tt]
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top