From: MikeD on


"LBS" <1(a)nospam.com> wrote in message
news:OPCGQtfHLHA.5680(a)TK2MSFTNGP05.phx.gbl...
> Hello
>
> I am using the following code to email contents with attachments.
>
> There is no problem when I use an email "TO" that belong to the exchange
> server domain I am using. The problem exists when I try to email to an
> email such as "yahoo.com" or "someotherDomain.com".
>
> What am I doing wrong ? is there something I need to change maybe on the
> exchange server to allow it to work ?


My thinking is along the same lines as Bob's. Depending on the mail server,
authentication may not be required when the recipient(s) are all part of the
same mail server. I see this a lot with Exchange. For example, the code
*I* use (also CDO) to send emails will send fine to others within my
workplace without having to provide login credentials. However, I can't
send an email to anyone else without providing the credentials to log in to
our Exchange server. I kinda doubt that including an attachment makes a
difference, but it might. I don't know anything about configuring Exchange
or any other email server. But there might be options where emails without
attachments will send without credentials, but you must provide them if
there is an attachment. Don't see that very often. What you do see, very
frequently, is a limit of the size of the attached file. So that might be
something to check as well. Something else you weren't clear on: do emails
send to these same recipients if there is NO attachment? If so, that most
likely means you either need to provide credentials when there's a file
attached, or the email is being blocked due to the attached file. This may
be because file size is exceeded or it could also be because of the file's
extension. Files having certain extensions are frequently blocked. And if
THAT'S the case, it may be getting blocked on the recipient's side of
things. IOW, you're sending it fine, but the recipient's mail server is
blocking it because it's configured to block emails that have files with
certain extensions attached to the email.

Just some more things for you to look at.

--
Mike