Solved

Why is CDO message not getting out to external addresses?

Posted on 2010-08-20
6
558 Views
Last Modified: 2013-12-18
I have an HTML form which solicits data and then passes it to an ASP page which formats and e-mails data out.  It works GREAT with internal addresses within our company.  As soon as I try to send to an external address, or mobile device, the whole thing crashes and I get:

error '8004020f'
/form/CMS/lean/hitCount/send_notice.asp, line 46

Line 46 is my mail.Send line

Why can't I send out??

Please see code below:

    <%
        when = Request.Form("when")
        what = Request.Form("S_event")
        where = Request.Form("line_name")
        why = Request.Form("why")
        message="At " &when & " an " &what & " for the " &where & " line due to " &why
       
       
        set cdoConfig = CreateObject("CDO.Configuration")
        with cdoConfig.Fields
            .Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
            .Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="xxx.yyy.com"
            .Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
            .Update
        end with
       
        set myMail=CreateObject("CDO.Message")
        with myMail
            set .Configuration = cdoConfig
            .From="fake_address@mycompany.com"
            .Subject="Safety Notification"
            .To="phone_number@carrier.net"
            .TextBody=message
            .Send  
        end with
       
        set myMail = nothing
    %>
0
Comment
Question by:dimmergeek
  • 3
  • 3
6 Comments
 
LVL 11

Expert Comment

by:Rajesh Dalmia
ID: 33485859
you have use SMTP authentication for CDO mail fire.
you have to set below values

.Item (http://schemas.microsoft.com/cdo/configuration/smtpauthenticate) = 1
.Item (http://schemas.microsoft.com/cdo/configuration/sendusername) = HostUsrname
.Item (http://schemas.microsoft.com/cdo/configuration/sendpassword) = HostPassword
0
 
LVL 11

Expert Comment

by:Rajesh Dalmia
ID: 33485874
0
 
LVL 7

Author Comment

by:dimmergeek
ID: 33485988
I added all that, (used my username and password for login to Exchange)
Get same error as before.

Is it possible this server can't send out and we use another server for that??
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 7

Author Comment

by:dimmergeek
ID: 33486412
Code works flawlessly with internal addresses.  WILL NOT work when I try to send to ANYTHING external (cell phone, e-mail...)
0
 
LVL 11

Accepted Solution

by:
Rajesh Dalmia earned 200 total points
ID: 33486696
is there any firewall setup which is stopping external mail fire....
0
 
LVL 7

Author Comment

by:dimmergeek
ID: 33487236
Not sure...I'm doing all this 'under the radar'
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Automapping, a wonderful feature with Exchange 2010 (SP2 onwards I believe), allows additional/Shared mailboxes that a user has access to be automatically mapped on Outlook client, simplifying the process by adding them while Outlook launches. Ho…
Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now