The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Hi!
First off, thank you for taking the time to read this. You help is much appreciated :-)
I have a snitz forum I have set up but I can't seem to get mail working. its at http://www.mltek.co.uk/forum.
Heres the contents of the inc_mail.asp file, I have removed everything that isn't 100% needed and I still can't get it to work..
<%
if trim(strFromName) = "" then
strFromName = strForumTitle
end if
Set iConf = Server.CreateObject ("CDO.Configuration")
Set Flds = iConf.Fields
'Set and update fields properties
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
Flds("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxxxxxxx@mltek.co.uk"
Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxxxxx"
Flds("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = "xxxxxxxx@mltek.co.uk"
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 objNewMail = Nothing
on error goto 0
%>
If I run the testemailcomponent.asp page it shows that cdo is available (its the only one is shows as being avalable).
If I try to use the sendmail function when looking at a users profile it says that the message was sent, but the email never arrives.
If I try to register a new user then they dont recieve the confirmation email to the email address that they entered.
I am 99% sure that the SMTP details I have entered are correct. I can send and recieve email from this account using Outlook with the same settings.. any sugestions?
First off, thank you for taking the time to read this. You help is much appreciated :-)
I have a snitz forum I have set up but I can't seem to get mail working. its at http://www.mltek.co.uk/forum.
Heres the contents of the inc_mail.asp file, I have removed everything that isn't 100% needed and I still can't get it to work..
<%
if trim(strFromName) = "" then
strFromName = strForumTitle
end if
Set iConf = Server.CreateObject ("CDO.Configuration")
Set Flds = iConf.Fields
'Set and update fields properties
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
Flds("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxxxxxxx@mltek.co.uk"
Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxxxxx"
Flds("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = "xxxxxxxx@mltek.co.uk"
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 objNewMail = Nothing
on error goto 0
%>
If I run the testemailcomponent.asp page it shows that cdo is available (its the only one is shows as being avalable).
If I try to use the sendmail function when looking at a users profile it says that the message was sent, but the email never arrives.
If I try to register a new user then they dont recieve the confirmation email to the email address that they entered.
I am 99% sure that the SMTP details I have entered are correct. I can send and recieve email from this account using Outlook with the same settings.. any sugestions?