473,830 Members | 2,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting a CDONT parameter

My website sends automatic emails from many (25) different places. I want to
send a second email by reading the parameters of the first one. I don't want
to have to repeat and maintain the assignment of the second email
From,To,Subject fields so I am just using an include at each point in the
code where I send an email:

Set MyCDONTSMail = CreateObject("C DONTS.NewMail")
MyCDONTSMail.Bo dyFormat= 0
MyCDONTSMail.Ma ilFormat= 1
MyCDONTSMail.Fr om= fr************* *@whatever.com
MyCDONTSMail.To = to*******@whate ver.com
MyCDONTSMail.Su bject="some subject"
MyCDONTSMail.Bo dy= "some text":
%>
<!--#include file="SendFollo wUpEmail.asp" -->
<%
MyCDONTSMail.Se nd
set MyCDONTSMail=no thing
-------------------------------------------------------------------------------
The SendFollowUpEma il.asp just wants to take the From,To,Subject parameters
that are defined in the original email and add a different body:

Set MyCDONTSMail2 = CreateObject("C DONTS.NewMail")
MyCDONTSMail2.B odyFormat= 0
MyCDONTSMail2.M ailFormat= 1
MyCDONTSMail2.F rom= MyCDONTSMail.Fr om
MyCDONTSMail2.T o= MyCDONTSMail.To
MyCDONTSMail2.S ubject=MyCDONTS Mail.Subject
MyCDONTSMail2.B ody= "some new text"
MyCDONTSMail2.S end
set MyCDONTSMail2=n othing

It chokes on this:

MyCDONTSMail2.F rom= MyCDONTSMail.Fr om

Object doesn't support this property or method: 'MyCDONTSMail.F rom'

Seems to me MyCDONTSMail.Fr om is only a string, why can't I retrieve its
value? More to the point though - how can I retrieve its value?

Thanks!
Feb 1 '06
11 3006
"Stefan Berglund" wrote in message
news:0q******** *************** *********@4ax.c om...
: On Thu, 02 Feb 2006 06:46:33 GMT, "Simon Wigzell" <si**********@s haw.ca>
wrote:
: in <dVhEf.534342$k i.526673@pd7tw2 no>
:
: >Well - I couldn't have been more explicit describing my problem and what
I
: >wanted to know, yet my problem remains unanswered and unadressed,
meanwhile
: >I have been given some unrelated and useless advice, so yes, you are
: >probably right.
:
: Oh I understand. This is something like "My mind is made up. Don't
confuse me
: with the facts!"
:
: No problem.

I like that response! Sorry Simon.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Feb 3 '06 #11
"Simon Wigzell" wrote in message news:Sy8Ef.4095 06$2k.270920@pd 7tw1no...
: My website sends automatic emails from many (25) different places. I want
to
: send a second email by reading the parameters of the first one. I don't
want
: to have to repeat and maintain the assignment of the second email
: From,To,Subject fields so I am just using an include at each point in the
: code where I send an email:
:
: Set MyCDONTSMail = CreateObject("C DONTS.NewMail")
: MyCDONTSMail.Bo dyFormat= 0
: MyCDONTSMail.Ma ilFormat= 1
: MyCDONTSMail.Fr om= fr************* *@whatever.com
: MyCDONTSMail.To = to*******@whate ver.com
: MyCDONTSMail.Su bject="some subject"
: MyCDONTSMail.Bo dy= "some text":
: %>
: <!--#include file="SendFollo wUpEmail.asp" -->
: <%
: MyCDONTSMail.Se nd
: set MyCDONTSMail=no thing
: -------------------------------------------------------------------------------
: The SendFollowUpEma il.asp just wants to take the From,To,Subject
parameters
: that are defined in the original email and add a different body:
:
: Set MyCDONTSMail2 = CreateObject("C DONTS.NewMail")
: MyCDONTSMail2.B odyFormat= 0
: MyCDONTSMail2.M ailFormat= 1
: MyCDONTSMail2.F rom= MyCDONTSMail.Fr om
: MyCDONTSMail2.T o= MyCDONTSMail.To
: MyCDONTSMail2.S ubject=MyCDONTS Mail.Subject
: MyCDONTSMail2.B ody= "some new text"
: MyCDONTSMail2.S end
: set MyCDONTSMail2=n othing
:
: It chokes on this:
:
: MyCDONTSMail2.F rom= MyCDONTSMail.Fr om
:
: Object doesn't support this property or method: 'MyCDONTSMail.F rom'
:
: Seems to me MyCDONTSMail.Fr om is only a string, why can't I retrieve its
: value? More to the point though - how can I retrieve its value?

There is a lot of ways to do it. As you said the values are not known so
just pass variables to it when the values are known. It could even be
session variables.

What you do it make it a subroutine.

sub sendMail(mailFr om, mailTo, mailSubject, mailBody)
Set MyCDONTSMail = CreateObject("C DONTS.NewMail")
MyCDONTSMail.Bo dyFormat = 0
MyCDONTSMail.Ma ilFormat = 1
MyCDONTSMail.Fr om = mailFrom
MyCDONTSMail.To = mailTo
MyCDONTSMail.Su bject = mailSubject
MyCDONTSMail.Bo dy= mailBody
end sub

With the follow up, just pass the different values to it.
sendMail "me@mydomain.co m", "yo*@yourdomain .com", "My Subject", "Here is my
message!"

If your message body is formatted, pass it as a variable.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Feb 3 '06 #12

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

Similar topics

1
1715
by: Simon Wigzell | last post by:
I'm generating HTML formatted emails in my asp program using CDONT. Depending on hoow ling the link is it will sometimes wrap and ruin the link. The is Detail email properties listing : ------=_NextPart_000_0314_01C418C2.90C5F130 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit At your request, we have created a webpage message for you: here...
2
6931
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on a type mismatch. It is positively because of the boolean(java primitive)parameter. It goes fine if I change this parameter to int or String. This inteface has a lot more methods which works fine, it is just the
1
2230
by: Simon Wigzell | last post by:
I send HTML formatted emails with links and images in them generated by my asp driven website. Occasionally the image will not appear and the link will not work. By looking at the email at the receive end, (right click/properties/details/message source, this is what I sent: <p align="center" style="margin-top: 0; margin-bottom: 0"><a href="http://www.mississippiprinting.com/MPCHomeOld.asp"> <img border="0"...
2
1587
by: Rajiv | last post by:
hi all , i have to send the mail to all the employees of the company , e-mail address is stored in a table . i m using cdont component to send the mail , what are the basic requirement of cdont how to install cdont on server 2000 and is it necessary that smtp server
2
8092
by: Martin Raychev | last post by:
Hi all, I have the following problem: I have a private method that returns a SqlDataReader. For this to work I have not to close the DB connection in the above method. I do this only to
1
2045
by: Simon Wigzell | last post by:
Is it possible to extract from a CDONT a value that has been added to it? e.g. can I say: MyCDONTSMail.From="some email address" MyCDONTSMail.To="some other email address" MyCDONTSMail.Subject="some subject" MyCDONTSMail.Body="some body" And then get those values later in the program e.g.:
2
3703
by: scotdb | last post by:
I'm trying to get the SQLERRMC info from the SQLCA into my SP so that I can use the information it provides. I'm successfully getting the SQLCODE and SQLSTATE and so added the SQLERRMC to the code which obtains these. It doesn't seem to work however - create procedure dbair001.sp001testerr ( ,OUT p_sqlstate CHAR(5) ,OUT p_sqlcode INTEGER ,OUT p_sqlerrmc VARCHAR(70)
1
12326
by: John Bailo | last post by:
This is a my solution to getting an Output parameter from a SqlDataSource. I have seen a few scant articles but none of them take it all the way to a solution. Hopefully this will help some poor soul. Situation: I want to do a lookup using a stored procedure for each value in a Row within a GridView. I use a lookup function in my code behind, evaluating the necessary bound fields. The problem is the SqlDataSource representing...
1
1374
by: bijuvellur | last post by:
why the mail goes to bulk? when we use ASP code using CDONT mail object
0
9780
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9641
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10476
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10520
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9310
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6940
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5615
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5775
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.