Author |
Topic |
CptSternn
Starting Member
Ireland
17 Posts |
Posted - 23 June 2008 : 11:02:43
|
I'm not sure if anyone addressed this issue - I searched the board for posts on this but haven't found any.
I recently moved my host to a new domain. After the move, the email stopped working and no longer sent any emails. I found that this was being caused by the way the system sends email.
I first had to turn off the On error resume next because the system was originally telling me the email sent without error. After commenting out line 155 I saw this: error '8004020e'.
With CDO mail, some IIS 6 & IIS 7 servers force you to send from the domain you are viewing. That means in the INC_MAIL file that the strSender has to be switched, but there is no option for this.
I fixed this easy enough by changing the following at line 138:
objNewMail.From = "noreply@MyDomain.com" objNewMail.ReplyTo = strSender
By setting the FROM field to an address at my local domain it fixes the problem. By then adding the REPLYTO field, I still maintain the original functionality so you can hit REPLY once you get the email and it still goes to the original sender.
Dunno if adding support in for this issue is in the works, but thought I'd post this to help out anyone else who might have the same issues. < |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
mahvin
Starting Member
48 Posts |
Posted - 29 June 2008 : 09:28:23
|
I recently had a similar problem with profile email links failing to work, so I took CptSternn's advice, created an actual domain email for the forum (I was using a gmail account before) and added it to the
objNewMail.From = "my@MyDomain.com"
in inc_mail and now it works!
Thanks to CptSternn!< |
|
|
Flashspot
Starting Member
United States
6 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
|
Flashspot
Starting Member
United States
6 Posts |
Posted - 12 July 2008 : 11:22:08
|
I think the key here is the serverport.< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 05 August 2008 : 08:13:31
|
I had nothing but trouble with IIS7, myself, finally got disgusted enough with MS and went back to 2003 Server & IIS6. Everything worked fine again.< |
|
|
rjb
Starting Member
3 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
|
rjb
Starting Member
3 Posts |
Posted - 05 January 2009 : 04:15:15
|
Tried that code .. cut and paste and change username and password. no go. my email i'm using is the same as the domain i'm running it on. i also added a line to it after i checked what you had adding serverport and still no go..
It takes a bit to come back after send is clicked to say it's sent. I'm thinking the auth portion is faling for some reason.
what would it take to find this out? Is there a way to manually test it.. or give more echo or feedback in the code as it buils the FLD items? or is it send with all the info and the server deals with it? I really dont have access to the email logs.. i could call but i dont think i do, i know that can help out a great deal.
Thanks for your response.
Rob
hmmm< |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 05 January 2009 : 04:35:15
|
are you sure that your host actually has cdosys set up correctly ? just because Snitz says it is installed does not mean that it is working
you could try removing the Err.Clear line to see if it is throwing an error.< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 05 January 2009 : 04:54:12
|
Well, I tried the first obvious thing - checked to see if your mail server was responding. Pinging mail.beams.us reroutes to pop.where.secureserver.net which times out, so your mail server might be down or they may have changed it.
< |
|
|
rjb
Starting Member
3 Posts |
Posted - 05 January 2009 : 22:54:24
|
Thanks for the info. The mail server works fine, i can send and receive email though it ok. Alot of hosts are shutting off pings to most servers.. for example i used to ping apple.com to check my connection and a few months back it stopped taking ping requests. At any Rate HuwR your code worked after i read a little bit on godaddy about after a search on google with "godaddy iis7 cdonts" and it gave my a .net code example and I just added a relay server that godaddy had in the .net code and it works great, had to have the username and pass... no port required.. here's the code I used for any future godaddy peeps.
case "cdosys"
Set iConf = Server.CreateObject ("CDO.Configuration")
Set Flds = iConf.Fields
'Set and update fields properties
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "relay-hosting.secureserver.net" 'strMailServer
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "emailaccountusernamehere"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "emailpasswordpasswordhere"
End With
Flds.Update
Set objNewMail = Server.CreateObject("CDO.Message")
Set objNewMail.Configuration = iConf
'Format and send message
Err.Clear
objNewMail.To = strRecipients
objNewMail.From = strSender
objNewMail.Subject = strSubject
objNewMail.TextBody = strMessage
On Error Resume Next
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
Set Flds = nothing
Set iConf = nothing
Set objNewMail = nothing
Edit: Added code tags.< |
Edited by - Podge on 06 January 2009 09:27:05 |
|
|
sikandar
Junior Member
Pakistan
135 Posts |
|
sikandar
Junior Member
Pakistan
135 Posts |
Posted - 27 August 2009 : 10:27:56
|
I changed the port to 465 and then following error,
Send an E-MAIL Message
error '8004020e' /inc_mail.asp, line 149 |
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
Topic |
|