473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SMTP: different mail from and from addresses?

Does anyone know if it's possible to make CDO send different "MAIL FROM"
addresses and "From" header in a message?

Our site allows users to send mail to others via the system, but since the
mail originates at our servers, the MAIL FROM needs to have our address, but
the From should have the end users. This is known as envelope masquerading,
among a bunch of other names.

I tried various Fields, header setting, etc, but nothing worked. I assume
the built in class can't handle it, question is can another component?
Nov 18 '05 #1
3 1726
Hi Max,

As for the problem you mentioned, I'm not sure what's the "MAIL FROM" you
mentioned. Generally the .net System.Web.Mail component's MailMessage only
contains a "From" property which represent the "From" header of a mail.
And in the CDO's IMessage Interface, there have two properties, "From" and
"Sender" which have different usages, below is the description on the
difference of "Sender" and "From" properties:

======================
The difference between the From and Sender properties is that the Sender
property represents the messaging user that actually submits the message,
while the From property designates its principal author or authors. If the
author and the sender are the same, it is only necessary to set the From
property, and it is recommended to leave the Sender property unset in this
case.
========================

Also, here is the original link in MSDN:

#From Property
http://msdn.microsoft.com/library/en...essage_from.as
p?frame=true

#Sender Property
http://msdn.microsoft.com/library/en...message_sender.
asp?frame=true

In addition, as far as I know , the System.Web.Mail and CDO are the
existing buildin components that .net framework and COM provide. If the
existing properties of them are not enough, I'm afraid we may look for some
other 3rd party raw SMTP components.

Hope helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #2
Basically there are two "parts" in SMTP. There's the commands that the
client sends that say "here's the envelope information about this message:
the from address, recipients, etc" and then later in the SMTP transaction,
the client sends the "text" headers that show up in the mail client. This
is how Bcc works. An address is in the envelope command phase, but not in
the headers.

So what I was hoping to do was to get SmtpMail to send the envelope from
address as one thing, but the from address in the message headers as
something else. It doesn't look like it's possible with regular SmtpMail,
but it's a trivial change. So what I did was get SmtpMail from the Mono
project and modify it there. :)

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:DQ**************@cpmsftngxa10.phx.gbl...
Hi Max,

As for the problem you mentioned, I'm not sure what's the "MAIL FROM" you
mentioned. Generally the .net System.Web.Mail component's MailMessage only
contains a "From" property which represent the "From" header of a mail.
And in the CDO's IMessage Interface, there have two properties, "From"
and
"Sender" which have different usages, below is the description on the
difference of "Sender" and "From" properties:

======================
The difference between the From and Sender properties is that the Sender
property represents the messaging user that actually submits the message,
while the From property designates its principal author or authors. If the
author and the sender are the same, it is only necessary to set the From
property, and it is recommended to leave the Sender property unset in this
case.
========================

Also, here is the original link in MSDN:

#From Property
http://msdn.microsoft.com/library/en...essage_from.as
p?frame=true

#Sender Property
http://msdn.microsoft.com/library/en...message_sender.
asp?frame=true

In addition, as far as I know , the System.Web.Mail and CDO are the
existing buildin components that .net framework and COM provide. If the
existing properties of them are not enough, I'm afraid we may look for
some
other 3rd party raw SMTP components.

Hope helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #3
Hi Max,

Thanks for your response. Yes, the buildin SMTPMAIL(based on the CDO
internally) or CDO component are all limited to the OS. Anyway, as you
mentioned that
=================
So what I did was get SmtpMail from the Mono
project and modify it there.
=================

Sounds great! Also, if you got any good ideas, please feel free to post
here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Haines Brown | last post by:
I have e-mail addresses in HTML source files both as commented information information and also as part of an e-mail link. Naturally, I'd like to hide them from harvesters to discourage more spam....
2
by: Frances Del Rio | last post by:
Pls, what are all illegal chars in e-mail addreses? specif. I'd like to know if apostrophe is allowed, but would be handy to find a list of all illegal chars for e-mail addresses.. searched...
11
by: Toble Rone | last post by:
Can anyone direct me to an article that explain how to send normal smtp emails from a VB.net windows app?. (i mean, using normal tcp to send the mail) Tnx in advance
2
by: WaveyD | last post by:
Hi Can somebody please please please help me I need to be able to poll the contents of an SMTP e-mail account The idea being, process an e-mail automatically and do something any attached...
0
by: Bruce Hodge | last post by:
Hi All, we want to run a .Net 1.1 website and Exchange Server 2003 on the same box. When we use the Smtp Send mail we get "Could not access 'CDO.Message' object." Error. Any thoughts on the...
0
by: Adam D. Barratt | last post by:
Hi, I've been searching Google for ideas as to how to use Mapi (in this case an Outlook client connecting to Exchange Server) from VB.NET to resolve e-mail addresses for contacts for which...
3
by: Chris Noble | last post by:
I need to be able to read and add to the collection of email addesses for an Active Directory User with a mailbox. I assume that this is a collection object. However I can't find any help on which...
1
by: the_ricka | last post by:
Hi all, I'm fairly new to python, but very excited about it's potential. I'm trying to write a simple program that will accept input from a command line and send email. The parameters I used on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.