Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Mail Configuration
 Email not working
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mark_laverty
Starting Member

United Kingdom
5 Posts

Posted - 03 October 2011 :  07:04:04  Show Profile  Reply with Quote
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?

Edited by - mark_laverty on 03 October 2011 07:04:47

Podge
Support Moderator

Ireland
3776 Posts

Posted - 03 October 2011 :  07:25:45  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
Does your host have any code samples for sending email? Or any instructions at all?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

mark_laverty
Starting Member

United Kingdom
5 Posts

Posted - 03 October 2011 :  07:47:49  Show Profile  Reply with Quote
quote:
Originally posted by Podge

Does your host have any code samples for sending email? Or any instructions at all?



Nothing that I have found.. BUT I do use .net in an aspx page to send mail from webforms on the root site..

Dim msg As New MailMessage
Dim emailClient As New SmtpClient("localhost", 25)
Dim SMTPUserInfo As New System.Net.NetworkCredential("xxxxxx@mltek.co.uk", "xxxxxxx")
Dim FromAddress As New System.Net.Mail.MailAddress("xxxxxx@mltek.co.uk")
msg.To.Add("xxxxxx@mltek.co.uk")
msg.From = FromAddress
emailClient.UseDefaultCredentials = False
emailClient.Credentials = SMTPUserInfo

msg.Subject = "abc123"
msg.Body = "abc123"
emailClient.Send(msg)
Response.Redirect("confirm.aspx")
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 03 October 2011 :  08:29:02  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
Try changing this

On Error Resume Next
objNewMail.Send


to this


On Error goto 0
objNewMail.Send


and then try to send an email. Post any error here.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

mark_laverty
Starting Member

United Kingdom
5 Posts

Posted - 03 October 2011 :  08:47:58  Show Profile  Reply with Quote
Ok, script changed... I now get this..

"Send an E-MAIL Message

error '80040211'
/forum/inc_mail.asp, line 30
"

Heres the script exactly as it is on the server (with the exception of the 'xxxx's to not disclose sensitive information.


<%
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") = "xxxx@mltek.co.uk"
Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxx"
Flds("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = "xxxx@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 goto 0
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
%>
Go to Top of Page

mark_laverty
Starting Member

United Kingdom
5 Posts

Posted - 03 October 2011 :  08:52:21  Show Profile  Reply with Quote
Interestingly if I change use SSL to 'True' then I get this message...

CDO.Message.1 error '80040213'

The transport failed to connect to the server.

/forum/inc_mail.asp, line 30

If I set it back to False then I get the previous message again. I guess that means that at least it is trying to connect to the server and failing as opposed to not even trying.
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 03 October 2011 :  09:23:59  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
Are you sure that strMailServer is set correctly? Try hardcoding it or entering the i.p. address.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

mark_laverty
Starting Member

United Kingdom
5 Posts

Posted - 03 October 2011 :  10:01:06  Show Profile  Reply with Quote
quote:
Originally posted by Podge

Are you sure that strMailServer is set correctly? Try hardcoding it or entering the i.p. address.



Ok.. fixed it.. BUT I'm not 100% sure how.

I tweaked the script.. set the strmailserver to "localhost", deleted and re-created the mail account I am using and re-created it without a leading "_" in the password as the hosting providers site didnt seem to like that.

Here's the script as it is on the website now..

<%
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") = cdobasic
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") = "xxxxx@mltek.co.uk"
Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxxx"
Flds("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = "xxxxx@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 goto 0
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
%>

So that seems to work great and I now have emails flowing even to external domains

Thank you very much for your help

Edited by - mark_laverty on 03 October 2011 10:02:26
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 03 October 2011 :  10:24:31  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
Glad you got it working.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07