CDOSYS problems

T

tshad

This is a problem that we saw before on our asp site, but don't know how to
fix it. We are seeing it on our .net site also.

We have our email sending from our Windows 2003 server with exchange fine,
unless we send to an alias.

It never gets there.

I can send directly and it works fine and the CDOSYS works fine to a
non-alias account.

I have the following code:

Dim Message As New MailMessage()
' message.From = webMasterEmail
message.From = "(e-mail address removed)"
message.To = email.text
message.Subject = "Confirmation Required"
message.Body = "This is a test message"
message.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = mailServer
smtpMail.Send(message)

This works fine when the message.To is to my yahoo, dslextreme as well as my
normal business account. If I send to my alias account at work it never
shows up. We seem to have this with all our aliases. But I can send
directly to the alias from outlook without any problem.

I don't think this is an exchange problem, as it works fine if I send to my
alias from my email client.

Anyone know why this doesn't work?

Thanks,

Tom
 
R

Ray Costanzo [MVP]

CDO wants an SMTP e-mail address. What do you mean by alias? What happens
if you address it to an Exchange recipient's SMTP address?

Also, is this ASP? Dim Message As...?

Ray at work
 
C

Curt_C [MVP]

tshad said:
This is a problem that we saw before on our asp site, but don't know how to
fix it. We are seeing it on our .net site also.

We have our email sending from our Windows 2003 server with exchange fine,
unless we send to an alias.

It never gets there.

I can send directly and it works fine and the CDOSYS works fine to a
non-alias account.

I have the following code:

Dim Message As New MailMessage()
' message.From = webMasterEmail
message.From = "(e-mail address removed)"
message.To = email.text
message.Subject = "Confirmation Required"
message.Body = "This is a test message"
message.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = mailServer
smtpMail.Send(message)

This works fine when the message.To is to my yahoo, dslextreme as well as my
normal business account. If I send to my alias account at work it never
shows up. We seem to have this with all our aliases. But I can send
directly to the alias from outlook without any problem.

I don't think this is an exchange problem, as it works fine if I send to my
alias from my email client.

Anyone know why this doesn't work?

Thanks,

Tom

Most likely its a "relay" setting. Check the drop folder, see if there
is message error there.
 
T

tshad

Curt_C said:
Most likely its a "relay" setting. Check the drop folder, see if there is
message error there.

Where is the Drop folder?

Is it on Exchange?

Thanks,

Tom
 
T

tshad

Ray Costanzo said:
CDO wants an SMTP e-mail address. What do you mean by alias? What
happens
if you address it to an Exchange recipient's SMTP address?

Exchange allows you to set up aliases either to different domains or
different names on the same domain. When the mail comes in, Exchange
resolves to your primary name.

For example, my primary name could be (e-mail address removed). But I could set
up an alias of (e-mail address removed).

Anyone sending mail to (e-mail address removed) would get rerouted to my address
([email protected]).

Or I could have multiple domains. I could have another domain of "abc.com"
(this would have to be a valid domain that is pointing to my server that has
exchange on it). So I could have (e-mail address removed) or (e-mail address removed) .

All of these would be resolved by Exchange to (e-mail address removed) and sent to
my machine.

Tom
Also, is this ASP? Dim Message As...?

No. In this case, it is asp.net - but no one has answered the question
there and I had the same problem in asp.
 
T

tshad

tshad said:
Where is the Drop folder?

Is it on Exchange?

Also, I can send mail directly from outside with not problem to these
addresses. It is only when I use my Web Server and CDOSYS that I seem to
have a problem.

Thanks,

Tom
 
C

Curt_C [MVP]

tshad said:
Also, I can send mail directly from outside with not problem to these
addresses. It is only when I use my Web Server and CDOSYS that I seem to
have a problem.

Thanks,

Tom

Yeah, but your "from" is registering as actually coming from the
webserver, and not matching, and trying to go out to yet another address...

But this amy all be irrelvant. What is the "alias" you are sending to?
Most likely its just a matter of exchange interpreting right.
If it doesnt work in ASP nor in ASP.NET most likely it is a
server/exchange setting, not a programming one I'd guess.
 
R

Ray Costanzo [MVP]

Your problem is most likely with relaying, dns, or Exchange. When a server
gets an e-mail that it's supposed to send, it performs a DNS lookup to check
for a mail exchanger (mx) DNS record to tell it where it should send the
e-mail. So, your IIS server, if not using a smarthost, will say, "Okay,
let's see. I have an e-mail here that's destinted for the deltanet.com
domain. Let me query my DNS server to see where that's supposed to go." If
it gets back a resposne from the DNS server, it attempts to connect to that
remote server and deliver the message to it. If that remote server answers
and says, "Uh, yeah, (e-mail address removed)? That should come here to me." And
then it will file the e-mail in the appropriate user's inbox. If the
message is not appearing in the user's inbox, what can be happening?

If you've successfully sent e-mails to other addresses in the same domain,
then you know that you're able to e-mail that domain from your IIS server.
So relaying and MX is fine. So, perhaps those other SMTP addresses don't
really exist? Or, if those e-mail addresses do in fact have a different
domain, then perhaps the MX records don't actually exist.

Is the From address of your mail object your e-mail address? If not, set it
to that so that you can see if you might get a response message back from
either the local or remote server giving you details as to what happened to
the message.

Ray at work
 
R

Roland Hall

"tshad" wrote in message : "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
: message : > CDO wants an SMTP e-mail address. What do you mean by alias? What
: > happens
: > if you address it to an Exchange recipient's SMTP address?
:
: Exchange allows you to set up aliases either to different domains or
: different names on the same domain. When the mail comes in, Exchange
: resolves to your primary name.
:
: For example, my primary name could be (e-mail address removed). But I could set
: up an alias of (e-mail address removed).

An account can support multiple addresses (secondaries) or you can have one
address forward to another in one of two ways:

1. forward and keep a copy
2. just forward

The primary address is used as the address given in the FROM: and REPLY-TO:

You can also setup a distribution list so anyone in the DL will get a copy
but the DL doesn't have a mailbox. Think of it as a multi-forward address.
You can also use a public folder because they too have addresses.

However, an alias in Exchange is not an address and it does not work with
3rd party. In other words, Outlook would have to be used to send to an
alias. Ex. (e-mail address removed) alias bhope. The alias would resolve to Bob's
primary address before sending but Outlook queries Exchange. I don't
remember if you have to be running Outlook in CW mode or if it also works in
IMO but irrelevant here.

: Anyone sending mail to (e-mail address removed) would get rerouted to my address
: ([email protected]).
:
: Or I could have multiple domains. I could have another domain of
"abc.com"
: (this would have to be a valid domain that is pointing to my server that
has
: exchange on it). So I could have (e-mail address removed) or (e-mail address removed) .

You can setup foreign addresses where a message could be accepted but it
then forwards the message to the foreign domain. These addresses to not
have local mailboxes.

: All of these would be resolved by Exchange to (e-mail address removed) and sent
to
: my machine.
:
: Tom
: >
: > Also, is this ASP? Dim Message As...?
:
: No. In this case, it is asp.net - but no one has answered the question
: there and I had the same problem in asp.

You would need to show Classic ASP code here. It will increase your chances
for success.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top