CDO question (1 Viewer)

ellenr

Registered User.
Local time
Today, 13:46
Joined
Apr 15, 2011
Messages
397
I load cdo email with data:
Set .Configuration = objConf
.To = sEmailAddress
.from = sFromField & " <" & sReplytoEmailAddr & ">"
.sender = sReplytoEmailAddr
.ReplyTo = sReplytoEmailAddr
.Subject = sSubjectLine
.htmlbody = strHTML​
The emails are actually sent via my personal email setup. What arrives in the recipient's email box:
From: "sFromField" <NOT sReplytoEmailAddr but rather my own >
To: sEmailAddress
Sent: 3/18/2019 7:50:39 PM
Subject: sSubjectLine​

How can I change the email address within the < > to the sreplytoemailaddr, or remove it completely, rather than have my own email address there? I would prefer to just remove it, but the reply to address would be ok. Interestingly, if the recipient replies, the reply goes to sReplytoEmailAddr.
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:46
Joined
Aug 30, 2003
Messages
36,118
How can the recipient get it in their mailbox without a valid address? What's the rest of the code?
 

ellenr

Registered User.
Local time
Today, 13:46
Joined
Apr 15, 2011
Messages
397
I edited it and we crossed in the mail. sEmailAddress is the email address of the recipient.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:46
Joined
Oct 29, 2018
Messages
21,358
Hi. Is this a question?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:46
Joined
Aug 30, 2003
Messages
36,118
I'm confused as to the problem. Are you really seeing variable names in the email instead of the values?

Have you tried using sReplytoEmailAddr for the from?
 

ellenr

Registered User.
Local time
Today, 13:46
Joined
Apr 15, 2011
Messages
397
No--the values are seen. I haven't tried using the sReplytoEmailAddr instead of sFromField--i'll give it a try and be right back.

sFromField is set to the name of the person sending the email
sReplytoEmailAddr is set to the email address of the sender
sEmailAddress is set to the email address of the recipient
subject and body are obvious.
 

ellenr

Registered User.
Local time
Today, 13:46
Joined
Apr 15, 2011
Messages
397
Tried it--only my own email address is in the From: line (without < > data). However, if I reply, the reply to address is the value of sReplytoEmailAddr.
I just don't understand why
.from = sFromField & " <" & sReplytoEmailAddr & ">" doesn't put the sReplytoEmailAddr between the < and the >.

Or, as I said, I would be happy enough to leave it out, but it puts my email address there even if I comment it out in the code.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:46
Joined
Aug 30, 2003
Messages
36,118
Are you using your credentials for the CDO? Can you use the reply to address credentials instead if so?
 

ellenr

Registered User.
Local time
Today, 13:46
Joined
Apr 15, 2011
Messages
397
pbaldy, I don't think I can use other credentials. I will give that a try later. I do know it somewhat depends upon the ISP involved. I hit upon this method a few years ago when Bellsouth wouldn't send via an outside email/credentials. I was trying to use the organization's gmail email address and the ISP blocked it.

June7, I will experiment with your suggestions.
 

ellenr

Registered User.
Local time
Today, 13:46
Joined
Apr 15, 2011
Messages
397
My brain is tired! I'll get back tomorrow. Thanks to you all.
 

Users who are viewing this thread

Top Bottom