473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

code for mailing using CDO written in JavaScript

Hi,

I usually use VBScript to send emails, however I need to use JavaScript.

Can anyone supply the necessary code - I have tried this literal translation
and although it doesn't cause any errors, no mail arrives.

var sch = "http://schemas.microsoft.com/cdo/configuration/";

var cdoConfig = Server.CreateObject("CDO.Configuration");

cdoConfig.Fields.Item(sch & "sendusing") = 2;
cdoConfig.Fields.Item(sch & "smtpserver") = "smtp.xyz.co.uk";
cdoConfig.Fields.Update();

var cdoMessage = Server.CreateObject("CDO.Message");

cdoMessage.Configuration = cdoConfig;
cdoMessage.From = "info@.xyz.co.uk";
cdoMessage.To = "te**@abc.co.uk";
cdoMessage.Subject = sSubject;
cdoMessage.TextBody = sBody;
cdoMessage.Send();

Any help appreciated.

Regards,

NEIL
Apr 2 '06 #1
2 8166
Neil Jarman wrote:
cdoConfig.Fields.Item(sch & "sendusing") = 2;
cdoConfig.Fields.Item(sch & "smtpserver") = "smtp.xyz.co.uk";


Do you truly intend to use the bitwise & here, or were you trying to
concatenate (+ in JScript)?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Apr 2 '06 #2
Ahh - you're quite right!

After many many years coding in VB, I quite forget (or miss) JS little
differences sometimes!!

Many thanks.

NEIL


"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:12*************@corp.supernews.com...
Neil Jarman wrote:
cdoConfig.Fields.Item(sch & "sendusing") = 2;
cdoConfig.Fields.Item(sch & "smtpserver") = "smtp.xyz.co.uk";


Do you truly intend to use the bitwise & here, or were you trying to
concatenate (+ in JScript)?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.

Apr 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dave Moore | last post by:
Hi All, Is it possible to implement a mailing list using PHP?. I know I could maintain a list of emails addresses in a db and send mail to them through my website, but how can I get true mailing...
25
by: delerious | last post by:
I see some code examples like this: <DIV onmouseover="this.style.background='blue'"> and other code examples like this: <DIV onmouseover="javascript:this.style.background='blue'"> Which...
109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
4
by: cmcvicker | last post by:
I have the following code in an ASP webpage where a member has logged in and wants to change his company information. This page lists the fields and records currently in our database (Access) and...
68
by: Steve | last post by:
Hi There, Prob a simple answer to this (I hope) but I can't quite work it out yet... I have this in a page: <map name="Map"> <area shape="rect" coords="43,68,52,77" href="map.html"...
7
by: Skybuck Flying | last post by:
Hi, if (__builtin_expect (!buffer->__init, 0)) { buffer->__a = 0x5deece66dull; buffer->__c = 0xb; buffer->__init = 1; } I am using visual c 6 and this code doesn't compile, it's probably...
2
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
3
by: Babak | last post by:
Hello everyone, I'm working on some Finite Elements(FE) codes in C and now I encountered some problems in assembly stage. The main idea is that a large number of 3 by 3 elemental stiffness...
78
by: Jeremy J Starcher | last post by:
(Request for Discussion) I've put together a guide that I hope will help novice coders avoid the same hair pulling that I went through. I'm open for comments about it. Have I missed the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.