Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Change CDONTS to W3 JMail
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Change CDONTS to W3 JMail

 Post Reply Post Reply
Author
kwouters View Drop Down
Newbie
Newbie


Joined: 07 August 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote kwouters Quote  Post ReplyReply Direct Link To This Post Topic: Change CDONTS to W3 JMail
    Posted: 16 September 2005 at 5:58am
Hi There,
 
I download a script (http://www.iloire.com/vbscript/online_photo_catalog_vbscript.asp) and installed it. It works great for me, except for one thing.
It should mail comments to me, but it does that using CDONTS. I don't have that installed on my server. I do have W3 Jmail, so I thought about rewriting the mail procedure.
 
Original script:
'lets send an email using CDONTS (be sure you have installed it in your server)
 Dim objCDO
 Set objCDO = Server.CreateObject("CDONTS.NewMail")
 objCDO.To = cAdminEmail
 objCDO.From = cAdminEmail
 objCDO.Subject = "Simple online photo catalogue comment"
 objCDO.Body = "Author: " & author & vbcrlf & _
 "Email: " & email & vbcrlf &  _
 "Comments: " & text & vbcrlf & _
 "Picture: " & vbcrlf & picturelink & _
 vbcrlf & "--" & vbcrlf & cPageTitle
 objCDO.Send
 Set objCDO = Nothing
 
Rewritten W3 Jmail script:
'lets send an email using w3Jmail (be sure you have installed it in your server)
 Dim objJMail
 Set objJMail = Server.CreateObject("JMail.SMTPMail")
 objJMail.ServerAdress = "smtp.onderwijs.casematelecom.nl:25"
 objJMail.Sender= cAdminEmail
 objJMail.SenderName = "Leko's Wereld Fotoalbum"
 objJMail.AddRecipient cAdminEmail
 objJMail.Subject = "Opmerking bij foto..."
 objJMail.Body = "Van: " & author & vbcrlf & _
 "E-mail: " & email & vbcrlf &  _
 "Opmerking: " & text & vbcrlf & _
 "Foto: " & vbcrlf & picturelink & _
 vbcrlf & "--" & vbcrlf & cPageTitle
 objJMail.Priority = 3
 objJMail.Execute
 Set objJMail = Nothing
 
Unfortunately it doesn't work. Other scripts (like the journal from this site) work fine. Does anyone know what the problem is?
Any help would be appriciated.
 
Greetings,
 
Koen
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2005 at 4:29pm
"Doesn't work" doesn't give much to go on. What or how?

Lead me not into temptation... I know the short cut, follow me.
Back to Top
kwouters View Drop Down
Newbie
Newbie


Joined: 07 August 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote kwouters Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2005 at 7:54am
Well the doesn't work stand for 'not sending an e-mail'.
I don't get any errormessage. But I don't get any mail as well.
As said other scripts using w3 Jmail work fine.
So my question mostly is: Is the code to send e-mail correct?
If so it must be some other problem.
Could I easily make a routine to output its result?
Something like response.write(succesfull) or responsewrite(unsuccesfull)? And what would that look like? I have no asp-experience.
Back to Top
kwouters View Drop Down
Newbie
Newbie


Joined: 07 August 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote kwouters Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2005 at 8:30am
Found the problem... I used the asp tutorial on this site, but it seems something have changed... e.g. Sender now is From, etc.
The correct script turned out to be:
'lets send an email using w3Jmail (be sure you have installed it in your server)
 Dim objJMail
 Set objJMail = Server.CreateObject("JMail.Message")
 objJMail.From= cAdminEmail
 objJMail.FromName = "Your albumname"
 objJMail.AddRecipient cAdminEmail
 objJMail.Subject = "Comment with photo"
 objJMail.Body = "From: " & author & vbcrlf & _
 "E-mail: " & email & vbcrlf &  _
 "Comment: " & text & vbcrlf & _
 "Picture: " & vbcrlf & picturelink & _
 vbcrlf & "--" & vbcrlf & cPageTitle
 objJMail.Priority = 3
 objJMail.Send ("yoursmtp.server.com")
 Set objJMail = Nothing
 
Thanks for thinking with me.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2005 at 7:57pm
Yeah, IIRC, Sender and From are actually two different things in Jmail. I think From has to be a valid Email account on your mail server but Sender can be anything you want to appear in the "From" field of the actual email. If you don't specify Sender, the email "From" defaults to the Jmail From.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.