Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Mail Configuration
 CDOSYS mail config issues

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
snowbird30ds Posted - 12 October 2020 : 14:41:57
I can't get aspmail to work anymore with ionos servers so been trying cdosys, I have successfully used the following test script but just can't get snitz to play ball, what do I need to add to inc_mail.asp?
<%
CONST SMTPSendUsing = 2 ' Send using Port (SMTP over the network)
CONST SMTPServer = "smtp.ionos.co.uk"
CONST SMTPServerPort = 587
CONST SMTPConnectionTimeout = 10 'seconds
CONST SMTPUser = "xxxxxxxx@xxxxxxx.co.uk"
CONST SMTPPassword = "xxxxXXXxxxx"

dim sSubject, sEmail, sMailBody, sFrom, sReadReceipt, sMsg
sSubject = "Test"
sEmail = "xxxxxxxxxx@outlook.com"
sMailBody = "This is a test message. wibble"
sFrom = "sender@domain.com"
sReadReceipt = true
sMsg = ""

On Error Resume Next

dim oMail, oConfig, oConfigFields
set oMail = Server.CreateObject("CDO.Message")
set oConfig = Server.CreateObject("CDO.Configuration")
set oConfigFields = oConfig.Fields

with oConfigFields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = SMTPSendUsing
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTPServerPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = SMTPUser
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = SMTPPassword
.Update
end with
oMail.Configuration = oConfig

oMail.Subject = sSubject
oMail.From = sFrom
oMail.To = sEmail
oMail.HTMLBody = sMailBody

oMail.Send
set oMail=nothing

sMsg = "Message Sent"

if Err.Number > 0 then sMsg = "ERROR: " & Err.Description

Response.Write sMsg

%>
6   L A T E S T    R E P L I E S    (Newest First)
HuwR Posted - 14 October 2020 : 20:00:02
not sure then, I would expect it to be a problem the other way round to be honest
snowbird30ds Posted - 14 October 2020 : 17:17:49
Still sends ok member to member but no registration emails.
HuwR Posted - 13 October 2020 : 19:43:51
OK, it should support setting sender, so try this, after the code below in the cdosys part of inc_mail

		objNewMail.To = strRecipients
		objNewMail.From = strSender
		objNewMail.Subject = strSubject
		objNewMail.TextBody = strMessage

insert the following line immediately below it and before the send command.
objNewMail.Sender = "AN EMAIL ADDRESS THAT IS VALID ON YOUR MAIL ACCOUNT"
HuwR Posted - 13 October 2020 : 17:02:11
The none delivery is because the sender needs to be a valid address on the mail server, by default I think it sets the from address which is different. I will check if that can be set differently for cdosys.

Not sure why your other settings don't appear.
snowbird30ds Posted - 13 October 2020 : 12:34:37
Thanks Huw.
It will send email now between members but the registration emails are not coming through either to admin or to the new member when approved, email settings as below.
Any idea what I'm missing?

Also the last two boxes always show as empty even though I fill them when I update configuration, is that normal?
HuwR Posted - 13 October 2020 : 07:53:27
in inc_mail.asp look for the case "cdosys" section. you need to change this part

	        'Set and update fields properties
        	Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'cdoSendUsingPort
	        Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
			'Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
			'Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
			'Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"

Try changing it to

        	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/smtpserverport") = 587
			Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
			Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = YOUR MAIL USER
			Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = YOUR MAIL PASSWORD

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07