?
Solved

Email stopped working ("CDONTS.NewMail")

Posted on 2003-03-15
8
Medium Priority
?
408 Views
Last Modified: 2007-12-19

I use the following script in my ASP pages, this code stopped working suddenly. Is anybody can able to able me?
---------------------

set sendMailer = Server.CreateObject("CDONTS.NewMail")
     sendMailer.MailFormat=0
     sendMailer.BodyFormat=0
     sendMailer.From = "Riaz"

     sendMailer.To = trim(objRec6("email"))    
     sendMailer.Subject = "Your adv. at ........."
     sendMailer.body = mess
     sendMailer.Send
     Set sendmailer = nothing          
     Response.Redirect "adm.asp?userval="&user1&","&userlog
end if

-----------------------
I checked with the service provider who asked me to sent the mail server as "supermail._______.net"

Can you tell me, where I will have to insert this "supermail.________.net" in order to make codes workable.  I don't have much experience.

Thanks  
0
Comment
Question by:peergs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 10

Accepted Solution

by:
apollois earned 300 total points
ID: 8145656
Hi peergs,

CDONTS assumes that the SMTP server is on the same machine as the web server.  If the web server is running on W2K Server, then CDOSYS is a better choice.  It will allow you set the SMTP server.

Here's a good place to start learning about CDOSYS:

CDOSYS Common Programming Tasks/Creating a Message Object
http://msdn.microsoft.com/library/en-us/cdosys/html/_cdosys_creating_a_message_object.asp 

To set the SMTP server for CDOSYS, see:
Configuring Network Authentication Information
http://msdn.microsoft.com/library/en-us/cdosys/html/_cdosys_configuring_network_authentication_information.asp

Best Regards,
>apollois<
0
 
LVL 10

Expert Comment

by:apollois
ID: 8145721
peergs,

Here is another article that may help:

HOWTO: Send HTML Formatted Mail Using CDO for Windows 2000 and a Remote SMTP Service
http://support.microsoft.com/?id=286431

Best Regards,
>apollois<
0
 
LVL 2

Expert Comment

by:ActiveMedia
ID: 8146229
CDONTS works fine for me!

1. I think the line at fault is:

    sendMailer.From = "Riaz"

Because .From must be followed by a valid (even if fictitious) email address.

    sendMailer.From = "Riaz@Riaz.com"




2. Presumably you are confident that:

   sendMailer.To = trim(objRec6("email"))    

always contains a valid genuine email address. Shouldn't it be validated somewhere?


HTH
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Expert Comment

by:Yawgmoth
ID: 8146808
ActiveMedia CDONTS prbably works well for you because the SMTP server is on the same physical machine as your script.  If this were a 2000 Machine I don't thik you could even create an instance of CDONTS (i could be wrong).  But yeah just to add my own 2 cents appolois is absolutely correct CDONTS os flawed.  
0
 
LVL 7

Expert Comment

by:cstsang
ID: 8150487
do you mean your program works in past?
Can you give us more detail your environment?
Such as your OS,intranet/internet environment.
0
 
LVL 7

Expert Comment

by:cstsang
ID: 8150534
Or
put the "supermail.________.net" in smarthost setting in your SMTP server.

If you want to have more detail step ,please let me more about your environment.
0
 
LVL 7

Expert Comment

by:cstsang
ID: 8150536
Or
put the "supermail.________.net" in smarthost setting in your SMTP server.Then restart your SMTP server.

However,if you want to have more detail step ,please let me more about your environment.
0
 
LVL 58

Expert Comment

by:Gary
ID: 9349742
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer by apollois

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

764 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