Hello sir,
When iam trying to send emails to my user accounts which are gmail id's using my application it is giving me this error.
Here is the error...
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
Not sending CDONTS created e-mails.
Here is the related code .... - '********************************************************
-
'Creating CDONTS mail object and sending mail to user
-
'********************************************************
-
-
Sub SendEmail(Sender, Receiver, Subject, Message)
-
-
'response.Write(Sender)
-
'response.Write(Receiver)
-
'response.Write(Subject)
-
'response.Write(Message)
-
'response.End()
-
'based on hosting server we need to enable mailing component
-
-
Set Cdo = Server.CreateObject("CDONTS.NewMail")
-
Cdo.From = Sender
-
Cdo.To = Receiver
-
Cdo.Subject = Subject
-
Cdo.Body = Message 'Content
-
Cdo.BodyFormat = 0 '--->HTML format
-
Cdo.MailFormat = 0 '--->HTML format
-
'''Response.Write Message & "<br>" 'Displays the content to be sent to receiver
-
-
if Session("UserType")="Participant" then
-
Cdo.Value("Reply-To") = Session("PEmail")
-
else
-
Cdo.Value("Reply-To") = Sender
-
end if
-
'response.Write(Message)
-
'response.End()
-
Cdo.Send 'Sends the mail
-
-
'Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
-
'Mailer.FromName = "Assessment"
-
'Mailer.FromAddress = "rv@gmail.com"
-
'Mailer.RemoteHost = "smtp.gmail.com"
-
-
''Here is where you can change who the email is sent to
-
-
'Mailer.AddRecipient strFirstname, strToEmail
-
-
'Mailer.ContentType = "text/html"
-
'Mailer.Subject = "Assessment:New Account Invitation"
-
'Mailer.BodyText = strMailbody
-
-
'if Mailer.SendMail then
-
'response.Write(strMailbody)
-
'response.End()
-
-
'Call SendEmail("rv@gmail.com", strToEmail, "Assessment:New Account Invitation", strMailbody)
-
-
End Sub
Please help....as mails are not going to the clients .....some online forums suggest replacing cdo with some thing called cdomessage.....iam new to this asp and do i need to change them or is there any other way....if i need to change and make it work what changes do i make and where.....this code is in common.asp ...
Thanks...
Jason.
7 3739
Hi Jason,
CDONTS is a deprecated object which means that it isn't supported anymore. Take a look at using CDOSYS - there are some excellent examples at w3schools which should help you.
I'd suggest you try one of their example scripts. If you have any problems implementing them then let me know.
Dr B
Hi Jason,
CDONTS is a deprecated object which means that it isn't supported anymore. Take a look at using CDOSYS - there are some excellent examples at w3schools which should help you.
I'd suggest you try one of their example scripts. If you have any problems implementing them then let me know.
Dr B
Sir as per ur direction changed the code as below...... -
'********************************************************
-
'Creating CDOSYS mail object and sending mail to user
-
'********************************************************
-
-
Sub SendEmail(Sender, Receiver, Subject, Message)
-
-
'response.Write(Sender)
-
'response.Write(Receiver)
-
'response.Write(Subject)
-
'response.Write(Message)
-
'response.End()
-
'based on hosting server we need to enable mailing component
-
-
Set Cdo = Server.CreateObject("CDO.NewMail")
-
Cdo.From = Sender
-
Cdo.To = Receiver
-
Cdo.Subject = Subject
-
Cdo.Body = Message 'Content
-
Cdo.BodyFormat = 0 '--->HTML format
-
Cdo.MailFormat = 0 '--->HTML format
-
Cdo.Configuration.Fields.Item _
-
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
-
'Name or IP of remote SMTP server
-
Cdo.Configuration.Fields.Item _
-
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
-
="smtp.server.com"
-
'Server port
-
Cdo.Configuration.Fields.Item _
-
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
-
=25
-
Cdo.Configuration.Fields.Update
-
'''Response.Write Message & "<br>" 'Displays the content to be sent to receiver
-
-
if Session("UserType")="Participant" then
-
Cdo.Value("Reply-To") = Session("PEmail")
-
else
-
Cdo.Value("Reply-To") = Sender
-
end if
-
'response.Write(Message)
-
'response.End()
-
Cdo.Send 'Sends the mail
-
-
'Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
-
'Mailer.FromName = "360 Assessment"
-
'Mailer.FromAddress = "sk@gmail.com"
-
'Mailer.RemoteHost = "localhost"
-
-
''Here is where you can change who the email is sent to
-
-
'Mailer.AddRecipient strFirstname, strToEmail
-
-
'Mailer.ContentType = "text/html"
-
'Mailer.Subject = "360 Assessment:New Account Invitation"
-
'Mailer.BodyText = strMailbody
-
-
'if Mailer.SendMail then
-
'response.Write(strMailbody)
-
'response.End()
-
-
'Call SendEmail("sk@gmail.com", strToEmail, "360 Assessment:New Account Invitation", strMailbody)
-
-
End Sub
-
but still it is giving this error....
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/Assessmentweb/Common.asp, line 57
please help....
Thanks...
Jason...
Hi Jason,
I think you need to change the line where you create your mail object to - Set Cdo = CreateObject("CDO.Message")
Does that help?
Also, please don't forget to use the # button in the posting window to surround your code with code tags - they make your posts much easier to read and save me and the other moderators time because we don't have to add them for you!!
Thanks,
Dr B
Hi Jason,
I think you need to change the line where you create your mail object to - Set Cdo = CreateObject("CDO.Message")
Does that help?
Also, please don't forget to use the # button in the posting window to surround your code with code tags - they make your posts much easier to read and save me and the other moderators time because we don't have to add them for you!!
Thanks,
Dr B
Sir Tried changing that line as u told no change ...same error is being displayed ...no change in error message also....
Thanks..
Jason.
can some one help me with this error please......
Thanks...
Jason.
Jason,
I've lifted the code below directly from the w3schools page that I linked to above. - <%
-
Set myMail=CreateObject("CDO.Message")
-
myMail.Subject="Sending email with CDO"
-
myMail.From="mymail@mydomain.com"
-
myMail.To="someone@somedomain.com"
-
myMail.TextBody="This is a message."
-
myMail.Send
-
set myMail=nothing
-
%>
If you run this script and you still get the error then perhaps you don't have the CDOSYS.dll installed on your deployment machine? What version of windows/windows server is running on that machine?
Dr B
Jason,
I've lifted the code below directly from the w3schools page that I linked to above. - <%
-
Set myMail=CreateObject("CDO.Message")
-
myMail.Subject="Sending email with CDO"
-
myMail.From="mymail@mydomain.com"
-
myMail.To="someone@somedomain.com"
-
myMail.TextBody="This is a message."
-
myMail.Send
-
set myMail=nothing
-
%>
If you run this script and you still get the error then perhaps you don't have the CDOSYS.dll installed on your deployment machine? What version of windows/windows server is running on that machine?
Dr B
hello sir
i ran this but did not get any error ...i ran a script that check for CDOSYS and it says that it is installed....so i also put this script that u gave now and put response.write and when i open the page no error....i get the message...
so what do u say do i need to change any thing on local host to try it ....i specified gmail ids ....did not specify any ports particularly.....
so please let me know ....
thanks..
jason.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: praba kar |
last post by:
Dear All,
I have doubt regarding mail sending smtplib
module. The below code is I used to send a mail.
##########################################
import email.Message
import email.Utils...
|
by: praba kar |
last post by:
Dear All,
Is it possible to send a message as a mail
with out smtplib module? If you find out any module
for mail sending(without smtplib) kindly mail me.
regards
Prabahar
|
by: Chris |
last post by:
I get the follow error on a linux box that is running sun asp:
CDONTS.NewMail.1 error '80020009' unable to connect to server
The error occurs when the Send Command is Executed.
Here is my code...
|
by: -Nacho- |
last post by:
Hi all
I have a table with some email addresses of a mailing list subscribers.
I'm triying to send a mail to them by querying the table and sending
the mail from a 'while' loop, but I only get...
|
by: Ibrahim. |
last post by:
Hello,
Im getting the following error when mail is sent from ASP.NET 2.0 website.
CDO.Messaging componenet is used for sending mail.
"
The message was not able to be transmitted to the SMTP...
|
by: Lakshmanakumar |
last post by:
hi all,
I am using an Object CDONTS for sending mail. with this i have an problem in sending image.All other text information had send but the image can't send. how can i overcome this problem...
|
by: Mitesh |
last post by:
I am facing the error while executing the mail sending application:
The "SendUsing" configuration value is invalid.
The error is in the line:
SmtpMail.Send(msg);
Please guide me.
|
by: rameshcse2005 |
last post by:
i caught by this error while sending mail using System.net.mail class
System.Net.Mail.SmtpException: Error in processing. The server response was:...
|
by: swethak |
last post by:
Hi,
i placed the php in windows server 2003 manually , set the path in Environmental variables , and place the php.ini file in windows.
Now php works fine in my server sytem.When i write the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |