[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Script "Sent" but not received by addressee

Script "Sent" but not received by addressee

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Script "Sent" but not received by addressee

Postby RobertAlder » Thu Dec 21, 2006 7:08 am

Working on my first script. Want it to create a new email, attached a file (always the same file), add the same subject and text in body, then send it to the same recipient.

In testing the easy part first, the script will create an email to the addresss in the script, add the subject and send it. Well, sort of. The email shows up in my "sent" box after running the script. (I'm testing by sending it to myself.) But the weird thing is, the email never arrives. No bounces, no errors Hmmm. How can that be?

Any ideas?
RobertAlder
Drop-in Visitor
 
Posts: 9
Joined: Sun Nov 20, 2005 10:35 am

Postby Tomas » Thu Dec 21, 2006 8:32 am

Aren't you just saving the email to the Sent box?

Save it to the Out box, and setup Pocomail to Send queued messages when checking mail, in options. Which will automatically send it out. Alternatively, I guess you could use Events for automatic sending.
Tomas
Tomas
Pillar of the Community
 
Posts: 1418
Joined: Sun Jul 25, 2004 1:34 am

Postby RobertAlder » Thu Dec 21, 2006 8:52 am

I don't think so. Here's the script:

Code: Select all
createmessage %CDIEamil

[Write Subject & TO in header
SetHeader %CDIEamil "Subject:" "Latest Data on RMVR Drivers"
SetHeader %CDIEamil "To:" "r.alder@earthlink.net"



{still woriking on writing  text for body of email and atttaching file


SendMessage %CDIEamil
exit
RobertAlder
Drop-in Visitor
 
Posts: 9
Joined: Sun Nov 20, 2005 10:35 am

Postby dazbo » Thu Dec 21, 2006 10:29 am

you probably need a from header as well
ie.
Code: Select all
SetHeader %CDIEamil "From:" "me@home.net"
dazbo
Drop-in Visitor
 
Posts: 13
Joined: Thu Dec 14, 2006 7:32 am

Postby Tomas » Thu Dec 21, 2006 10:47 am

good point, if even that will not work, I would also consider adding the X-Account header with correct data (name of the account)
Tomas
Tomas
Pillar of the Community
 
Posts: 1418
Joined: Sun Jul 25, 2004 1:34 am

Postby RobertAlder » Thu Dec 21, 2006 11:17 am

Actually I solved the problem another way. I ended the script with EditMessage commad. This is better since it allows the user the opportunity to review and/or change it before it is blasted off into cyper space. After they review it, they simly hit "Send" ( from the program's compose mode mode) and the email goes thru just fine.

Here's my complete script which, by the way, is run by an Access macro using the command line poco.exe /r "SendCDInewData" That same macco also freshens up the attached spreadsheet. Cool.

Thanks for your quick responses.
<snip>
Code: Select all
{Start an email
createmessage %CDIemail

[Write Subject & TO in header
SetHeader %CDIemail "Subject:" "Latest and Greatest Data on RMVR Drivers"
SetHeader %CDIemail "To:" "r.alder@earthlink.net"

{write text for body of email
AssignBody %CDIemail "Please save this file in the folder where you always save this file (My Documents is fine).  If you spot that I've not entered any recent changes from you, please let me know so I can correct them.  Many thanks.  Diane Hively"

{attach a file
set $p "c:\rmvrsys\CDI-Lic-Data.xls"
attachfile %CDIemail $p

EditMessage %CDIemail
exit


~ Added Code tags + removed personal info ... Eric ~
RobertAlder
Drop-in Visitor
 
Posts: 9
Joined: Sun Nov 20, 2005 10:35 am


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 0 guests

cron