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
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