navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Notification of Page Access - Godaddy Host

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Notification of Page Access - Godaddy Host
Page: [1]
 
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
Notification of Page Access - Godaddy Host - 10/5/2007 11:16:26   
Hi,

I have been using the following code to alert me when I have a pending item by sending me an email when some gets to my "thankyou.asp" page. This has worked well up until recently when I switched my site over to godaddy and now I am no longer getting the emails letting me know I need to OK an event.

<%
Dim stname,st
stname = "mysite.com Has Received a calendar request for approval"
st = Request.Form("st")
Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
ObjMail.To = "me@mysite.com "
ObjMail.From = "me@mysite.com "
ObjMail.Subject = "Website - Calendar Event pending for mysite.com "
ObjMail.Body = stname & vbcrlf&_
st
ObjMail.Send
Set ObjMail = Nothing
%>


After some web searching someone stated with godaddy I need to add the line SmtpMail.SmtpServer = "relay-hosting.secureserver.net" but I have tried it in several places in my statement with no luck.

Any ideas???
William Lee

 

Posts: 1179
Joined: 1/25/2002
From: Singapore
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 11:20:41   
Have you checked with godaddy which ASP email component they support? Your script is CDONT, the one recommended to you is smtpmail.



_____________________________

William Lee

pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ
nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ





(in reply to Mav44)
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 11:29:01   
The only info I could find on Godaddy stated

Use the following relay server in your ASP CDONTS code:

relay-hosting.secureserver.net

You do not need to provide a user name and password for this relay server.


http://help.godaddy.com/article.php?article_id=956&topic_id=100


(in reply to William Lee)
William Lee

 

Posts: 1179
Joined: 1/25/2002
From: Singapore
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 11:39:36   
I remembered somewhere that Godaddy works with CDOSYS and not very well with CDONTS.

Are you able to check with them on this?

_____________________________

William Lee

pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ
nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ





(in reply to Mav44)
William Lee

 

Posts: 1179
Joined: 1/25/2002
From: Singapore
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 11:48:38   
I found this link

http://help.godaddy.com/article.php?article_id=1073&topic_id=216

_____________________________

William Lee

pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ
nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ





(in reply to William Lee)
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 12:22:06   
Ok, this is the part where my inexperience shows. Will i be able to embed this code into my asp doc like;

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>


// language -- C#
// import namespace
using System.Web.Mail;

private void SendEmail()
{
const string SERVER = "relay-hosting.secureserver.net";
MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = "emailaddress@domainname";
oMail.To = "emailaddress@domainname";
oMail.Subject = "Test email subject";
oMail.BodyFormat = MailFormat.Html; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = "Sent at: " + DateTime.Now;
SmtpMail.SmtpServer = SERVER;
SmtpMail.Send(oMail);
oMail = null; // free up resources
}


</body>

</html>

(in reply to William Lee)
William Lee

 

Posts: 1179
Joined: 1/25/2002
From: Singapore
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 12:25:26   

quote:

ORIGINAL: Mav44

Ok, this is the part where my inexperience shows. Will i be able to embed this code into my asp doc like;

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>


// language -- C#
// import namespace
using System.Web.Mail;

private void SendEmail()
{
const string SERVER = "relay-hosting.secureserver.net";
MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = "emailaddress@domainname";
oMail.To = "emailaddress@domainname";
oMail.Subject = "Test email subject";
oMail.BodyFormat = MailFormat.Html; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = "Sent at: " + DateTime.Now;
SmtpMail.SmtpServer = SERVER;
SmtpMail.Send(oMail);
oMail = null; // free up resources
}


</body>

</html>



You forgot the ASP tags.

<%

blah..blah....
.....
....

%>

_____________________________

William Lee

pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ
nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ





(in reply to Mav44)
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 13:05:22   
William,
Thanks for hanging in there with me I know I must be getting close. I tried the example below and I get an error message. I have also tried replacing the { with <% and I get an error message. What am I missing?

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<%
// language -- C#
// import namespace
using System.Web.Mail;

private void SendEmail()
{
const string SERVER = "relay-hosting.secureserver.net";
MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = "emailaddress@domainname";
oMail.To = "emailaddress@domainname";
oMail.Subject = "Test email subject";
oMail.BodyFormat = MailFormat.Html; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = "Sent at: " + DateTime.Now;
SmtpMail.SmtpServer = SERVER;
SmtpMail.Send(oMail);
oMail = null; // free up resources
}
%>

</body>

</html>

(in reply to William Lee)
William Lee

 

Posts: 1179
Joined: 1/25/2002
From: Singapore
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 13:07:54   

What error msg was generated?

_____________________________

William Lee

pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ
nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ





(in reply to Mav44)
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 13:19:26   
When I try and pull up the page I get:



Microsoft VBScript compilation error '800a0401'

Expected end of statement

/email1.asp, line 13

using System.Web.Mail;
---------------------^

(in reply to William Lee)
ou812

 

Posts: 1602
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 13:25:50   
It looks like you're trying to use ASP.NET, C#, and not ASP.

Here's an ASP example: http://www.aspdev.org/articles/asp-cdosys/


_____________________________

-brian

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to Mav44)
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 13:32:53   
I tried the site above and came up with the code below but now I get an error message:

error '8004020f'
/email1.asp, line 26





New Code
-------------------------------------------------------------------------------------------------------------

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<%

Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = Server.CreateObject ("CDO.Configuration")

oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
oMailConfig.Fields.Update

Set oMail.Configuration = oMailConfig
oMail.From = "admin@mysite.com"
oMail.To = "admin@mysite.com"
oMail.Subject = "Here goes the email subject..."
oMail.HTMLBody = "Here goes the email body..."
oMail.Send

Set oMail = Nothing
Set oMailConfig = Nothing

%>
</body>

</html>

(in reply to ou812)
ou812

 

Posts: 1602
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 14:08:18   
The error number usually means the server is rejecting the email for some reason. I would first try making sure your "from" address is from your domain. Your host probably doesn't allow from's from other domain names (to help prevent spammers). While you're at it I would also supply a valid "To" address.

Let us know how it goes after this.

_____________________________

-brian

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to Mav44)
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 14:18:27   
I tried a couple of different addresses in both the TO and FROM and it did not change the error code. All of the addresses I used were in the same domain as the page.

(in reply to ou812)
ou812

 

Posts: 1602
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 14:21:03   
I've not used CDOSYS in quite some time, so not sure what the extra configuration settings are for. Can you try a simpler example and see what happens, substituting your domain names etc.

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

_____________________________

-brian

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to Mav44)
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 15:49:01   
Interesting, no error messages this time but I did not receive any email either. I wonder if Godaddy is blocking this email or I need to incorporate the SmtpMail.SmtpServer = "relay-hosting.secureserver.net" statment into this code for this page to be able to send the email?

(in reply to ou812)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 16:25:19   
You need the smtp server :

oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "relay-hosting.secureserver.net"


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Mav44)
ou812

 

Posts: 1602
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 16:33:21   
As spooky said above! :)

Looks like godaddy is a bit picky with how they do their emailing. Here is supposedly a working example from another godaddy client: http://www.jeorgethedodo.com/doug/2005_May/cdo_mail_object.asp

_____________________________

-brian

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to Spooky)
Mav44

 

Posts: 122
Joined: 6/25/2006
Status: offline

 
RE: Notification of Page Access - Godaddy Host - 10/5/2007 20:04:56   
Spooky to the rescue!

I want to thank everybody who helped me on this one as my page and email notification is working like a charm! I have posted my final code below for any who follow this post looking for an answer as it looks like GoDaddy is not real clear on this issue.

Thanks again everyone!!!

--------------------------------------------------------------------------------------------------------

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<%

Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = Server.CreateObject ("CDO.Configuration")
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "relay-hosting.secureserver.net"
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
oMailConfig.Fields.Update

Set oMail.Configuration = oMailConfig
oMail.From = "ME@MYSITE.com"
oMail.To = "ME@MYSITE.com"
oMail.Subject = "Here goes the email subject..."
oMail.HTMLBody = "Here goes the email body..."
oMail.Send

Set oMail = Nothing
Set oMailConfig = Nothing

%>
</body>

</html>

(in reply to ou812)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Notification of Page Access - Godaddy Host
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts