This is my code in PHP:
$mail = new COM("iMSMail.SendMail") or die("Unable to init
iMSMail.SendMail");
$to = "[EMAIL PROTECTED]";
$mail->smtpto->value=$to;
$mail->smtpfrom="[EMAIL PROTECTED]";
$mail->setheader("Subject","Test");
$mail->BODY="Test";
$mail->SpoolDir= "d:\\ims\\out";
foreach (explode(',',$to) as $address) {
// $mail->AddRecipients($address); // uncomment this and it will at
least send, but in one control file
}
$mail->SendMail();
print "Result: " . $mail->Result . ": " . $mail->ResultString;
My belief is that the problem is with
$mail->smtpto->value=$to;
If I try
$mail->smtpto=$to;
that causes a runtime error. I don't think the SMTPTO value of the object
is being set. Howie, you have PHP, can you cut and paste this and see if
you get the same thing?
Thanks!
Tac
----- Original Message -----
From: "Howie Hamlin" <[EMAIL PROTECTED]>
To: "inFusion Support List" <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 1:32 PM
Subject: Re: [iMS] single mail file where there should be multiple
> I tested the COM object with CF as follows:
>
> <CFOBJECT ACTION=CREATE NAME=myobj CLASS=iMSMail.SendMail>
> <cfset myobj.smtpto="[EMAIL PROTECTED],[EMAIL PROTECTED]">
> <cfset myobj.smtpfrom="[EMAIL PROTECTED]">
> <cfset myobj.setheader("To","[EMAIL PROTECTED]")>
> <cfset myobj.setheader("From","[EMAIL PROTECTED]")>
> <cfset myobj.setheader("Subject","Test")>
> <cfset myobj.body="This is a test.">
> <cfset myobj.Spooldir="e:\test\">
> <cfset dummy=myobj.sendmail()>
> <cfoutput>Results of mail sending:<br><br>
> #myobj.result# - #myobj.resultstring#
> </cfoutput>
>
> This code creates one mail file and two control files.
>
> Regards,
>
> Howie
>
> ----- Original Message -----
> From: "Tac" <[EMAIL PROTECTED]>
> To: "inFusion Support List" <[EMAIL PROTECTED]>
> Sent: Thursday, February 13, 2003 1:28 PM
> Subject: Re: [iMS] single mail file where there should be multiple
>
>
> > Unfortunately, I can't figure out the syntax to make that work. I used
the
> > addrecipient method because eventually I got that to work.
> >
> > When I do
> >
> > $mail->SMTPTO->value=$to; // $to is the comma-delimited list
> >
> > The error message I get when I go to send the mail is
> >
> > Result: 3: No recipients specified
> >
> > If I remove the ->value, the script dies an ugly death. (I don't
understand
> > when the ->value is needed, some vars need it, others don't.)
> >
> > So, how do I set the SMTPTO value to the comma-delimited list? I'm
using
> > PHP, but I don't think that should make much of a difference, except
that
> > maybe it is case-sensitive and other languages aren't. If you'd like, I
can
> > send you my php script that shows this problem.
> >
> > Thanks!
> >
> > Tac
> >
>
>
==^=======================================================
This list server is Powered by iMS
"The Swiss Army Knife of Mail Servers"
--------------------------------------
To leave this list please complete the form at
http://www.coolfusion.com/iMSSupport.cfm
Need an iMS Developer license? Sign up for a free license here:
http://www.coolfusion.com/iMSDevelopers.cfm
List archives: http://www.mail-archive.com/infusion-email%40eoscape.com/
Note: You are subscribed as [email protected]
==^=======================================================