Community Discussions and Support
Text file for use by PMAIL

[quote user="Fews"]

Weekly Report

TO: xxx@gmail.com, xxx@mail.edu

BC: xxx@email.edu

SU: Subject

AT: C:\Reporting\Rprt.pdf,unknown,0


Good morning all,
 
BODY OF TEXT
 
Thanks.
 
signed.[/quote]
By comparing the PMW file resulting from your above script to one created by Pegasus Mail you could have figured it out (although I must say Pegasus Mail is overly strict here, IMO): The two letter code mustn't be followed by a blank space, i.e. a working version of the above should look like this:

Weekly Report

TO:xxx@gmail.com, xxx@mail.edu
BC:xxx@email.edu
SU:Subject
MI:1
AT:C:\Reporting\Rprt.pdf,unknown,0

Good morning all,
 
BODY OF TEXT
 
Thanks.
 
signed. 

But there's another important issue: Please note the line containing MI:1, if you do not add this line it won't create a legal MIME message and the attachment will be sent as an UU encoded enclosure instead.

<p>[quote user="Fews"]</p> <div>Weekly Report</div> <div>TO: xxx@gmail.com, xxx@mail.edu</div> <div>BC: xxx@email.edu</div> <div>SU: Subject</div> <div>AT: C:\Reporting\Rprt.pdf,unknown,0</div> <div><div> </div><div>Good morning all,</div><div> </div><div>BODY OF TEXT</div><div> </div><div>Thanks.</div><div> </div><div>signed.[/quote]</div><div>By comparing the PMW file resulting from your above script to one created by Pegasus Mail you could have figured it out (although I must say Pegasus Mail is overly strict here, IMO): The two letter code mustn't be followed by a blank space, i.e. a working version of the above should look like this:</div><div> </div></div><div> <blockquote><div> Weekly Report </div><div>TO:xxx@gmail.com, xxx@mail.edu</div><div>BC:xxx@email.edu</div><div>SU:Subject</div><div>MI:1</div><div>AT:C:\Reporting\Rprt.pdf,unknown,0</div><div> </div><div>Good morning all,</div><div> </div><div>BODY OF TEXT</div><div> </div><div>Thanks.</div><div> </div><div>signed. </div></blockquote> But there's another important issue: Please note the line containing <i>MI:1</i>, if you do not add this line it won't create a legal MIME message and the attachment will be sent as an UU encoded enclosure instead.</div>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

I scanned through the first 10 pages of this forum and dropped a few searches but could not get to the specific issue I am having.

I am using PMAIL as my autoemailer program which is run out of some SAS code. Basically, the SAS code drops into the command prompt and runs pmail.

Command line:  x 'C:\pmail\programs\winpm-32.exe -J  "C:\Reporting\Email.txt"';

Now then, this line calls a text file in the folder that reads:

**********************************************************************

Weekly Report
TO: xxx@gmail.com, xxx@mail.edu
BC: xxx@email.edu
SU: Subject
AT: C:\Reporting\Rprt.pdf,unknown,0

Good morning all,
 
BODY OF TEXT
 
Thanks.
 
signed. 

*******************************************************************
 
I then get the error: The file 'Rprt.pdf' which has been attached to a message in your outgoing mail queue, cannot be located. Please edit and re-attach the file, or remove it prior to sending.
The path is correct and has been checked by myself and my supervisor. Removing the attachment statement in the text file pushes the email through just fine and everyone listed receives the mail sans PDF report.
I have attempted to remove the 'unknown' and '0' from the attachment statement, which sends the email through without the attachment obviously. I have also attempted quotes to enclose the name of the attachment, etc. Anyone have a similar issue or something close that I can try a work around? 
<p>I scanned through the first 10 pages of this forum and dropped a few searches but could not get to the specific issue I am having.</p><p>I am using PMAIL as my autoemailer program which is run out of some SAS code. Basically, the SAS code drops into the command prompt and runs pmail.</p><p>Command line:  x 'C:\pmail\programs\winpm-32.exe -J  "C:\Reporting\Email.txt"';</p><p>Now then, this line calls a text file in the folder that reads:</p><p>**********************************************************************</p><div><div>Weekly Report</div><div>TO: xxx@gmail.com, xxx@mail.edu</div><div>BC: xxx@email.edu</div><div>SU: Subject</div><div>AT: C:\Reporting\Rprt.pdf,unknown,0</div><div> </div><div>Good morning all,</div><div> </div><div>BODY OF TEXT</div><div> </div><div>Thanks.</div><div> </div><div>signed. </div><div> </div></div><div>*******************************************************************</div><div> </div><div>I then get the error: The file 'Rprt.pdf' which has been attached to a message in your outgoing mail queue, cannot be located. Please edit and re-attach the file, or remove it prior to sending.</div><div>The path is correct and has been checked by myself and my supervisor. Removing the attachment statement in the text file pushes the email through just fine and everyone listed receives the mail sans PDF report.</div><div>I have attempted to remove the 'unknown' and '0' from the attachment statement, which sends the email through without the attachment obviously. I have also attempted quotes to enclose the name of the attachment, etc. Anyone have a similar issue or something close that I can try a work around? </div>

[quote user="Fews"]Anyone have a similar issue or something close that I can try a work around? [/quote] Did you try to create a similar message from within Pegasus Mail (using the same attached file) and send it? Does it throw the same error? And if not, is there any significant difference in the resulting PMW file that you can duplicate in your script to work around the error?

If all this doesn't work out you might want to try Pegasus Mail's DDE interface (see winpmdde.txt in Pegasus Mail's Resource subdirectory).

<p>[quote user="Fews"]Anyone have a similar issue or something close that I can try a work around? [/quote] Did you try to create a similar message from within Pegasus Mail (using the same attached file) and send it? Does it throw the same error? And if not, is there any significant difference in the resulting PMW file that you can duplicate in your script to work around the error?</p><p>If all this doesn't work out you might want to try Pegasus Mail's DDE interface (see <em>winpmdde.txt</em> in Pegasus Mail's <em>Resource</em> subdirectory).</p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

Ahh yes - always seem to leave out a detail or two.

I could send the email manually with the attached PDF without a problem. The only differences I could see is when sending through the command prompt, the attachment in Pegasus (through the attachments tab) on that email is set to size 0.0k. Setting up the email manually and attaching the PDF populates with a size 120k.

This leads me to believe the AT: part of the text file is in error in that it keeps the "0" file size. I have also attempted to bump that to the size of the file found when manually attaching the PDF as well with the same errors.

 I will check out the DDE stuff after lunch. Thanks for the input. 

<p>Ahh yes - always seem to leave out a detail or two. </p><p>I could send the email manually with the attached PDF without a problem. The only differences I could see is when sending through the command prompt, the attachment in Pegasus (through the attachments tab) on that email is set to size 0.0k. Setting up the email manually and attaching the PDF populates with a size 120k. </p><p>This leads me to believe the AT: part of the text file is in error in that it keeps the "0" file size. I have also attempted to bump that to the size of the file found when manually attaching the PDF as well with the same errors. </p><p> I will check out the DDE stuff after lunch. Thanks for the input. </p>

[quote user="Fews"]I will check out the DDE stuff after lunch. Thanks for the input. [/quote]

Before wasting too much time try the following first: Use double backslashes like this: C:\\Reporting\\Rprt.pdf (don't ask me why, I'm doing something similar with my MiniDump extension for creating crash dumps (it uses DDE); I don't remember how I figured it out).

<p>[quote user="Fews"]I will check out the DDE stuff after lunch. Thanks for the input. [/quote]</p><p>Before wasting too much time try the following first: Use double backslashes like this: C:\\Reporting\\Rprt.pdf (don't ask me why, I'm doing something similar with my MiniDump extension for creating crash dumps (it uses DDE); I don't remember how I figured it out).</p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

> I am using PMAIL as my autoemailer program which is run out of some SAS code. Basically, the SAS code drops into the command prompt and
> runs pmail.
>
> Command line:  x 'C:\pmail\programs\winpm-32.exe -J  "C:\Reporting\Email.txt"';

I have no solution for this other than to forget about using Pegasus Mail for this, this commandline option is like using a sledge hammer to kill a fly.  Try Blat! instead.to send your file.


BLAT  http://sourceforge.net/projects/blat

DESCRIPTION:

Blat is a Public Domain  Windows NT console utility that sends the contents of a file in an e- mail message using the SMTP protocol. Blat is useful for creating scripts where mail has to be sent automatically (CGI, backups, etc.) To use Blat you must have access to a SMTP server via TCP-IP. Blat uses the a DLL ("gensock" or "gwinsock") from WinVN, the public domain usenet newsreader for windows. Blat can store a default SMTP server address and a default "From:" field in the registry. The server's address can be overriden using the -server flag, and the "From:" address using the -f flag. Input from the console (stdin) can be used instead of a disk file (if the special filename '-' is specified). Blat can also "carbon copy" and "blind carbon copy" the message. Impersonation can be done with the -i flag which puts the value specified in the "From:" line, however when this is done the real senders address is stamped in the "Reply-To:" and "Sender:" lines. This feature can be useful when using the program to send messages from NT users that are not registered on the SMTP host.   Optionally, blat can also attach multiple binary files to your message.

You could also have your application write a message in final form directly to the queue.  Here's a sample, the message body only needs the required data.  This will be sent the next time Pegasus Mail sends the mail just like using the commandline mail option.

------------------------   spam.101 ----------------------------
$$ cslaw@indirect.com
tstephen@mtshasta.lmms.lmco.com
support@tstephenson.com

From: swallace@cyberpromo.com (Sanford Wallace)
Organization: Ambulance Chasing, Inc.
To: "Laurence A Canter" <spamford@wilhelp.com>
Date: Fri, 17 Oct 2003 12:55:34 -0400
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Test Message
Reply-to: "Taylor Jimenez" <taylor@wilhelp.com>
CC: "Martha S Siegel" <Martha@smartbotpro.net>
Priority: normal
Message-id: <399917090.3123.1066456430@persephone.pmail.gen.nz>
X-mailer: Pegasus Mail for Win32 (v3.12c)

This is a test of the mail servers settings for spammers.

Here's a little text file that you can use to test Mercury/32
or Pegasus Mail.   With Mercury or Mercury/32 you save the
file in the Mercury queue with the 101 extension.  With Pegasus
Mail you save the message in the HOME mail directory with the
PMX file extension.
 
This is a file in "Glue" headers format, the $$ line is the
SMTP MAIL FROM: address, the next two lines are RCPT TO:
addresses and the blank line is the separator from the RFC 2822
message body.  You can delete the Date: or Message-ID line in
the message body, the SMTP relay host is expected to add these
to the file.  Copy and paste the file to Notepad and then save
it with the correct extension it the correct queue.  Modify the
RCPT TO: "Glue" headers to use your own addresses.
---------------------------- cut here ----------------------------


 

 

&lt;p&gt;&amp;gt; I am using PMAIL as my autoemailer program which is run out of some SAS code. Basically, the SAS code drops into the command prompt and &amp;gt; runs pmail. &amp;gt; &amp;gt; Command line:&amp;nbsp; x &#039;C:\pmail\programs\winpm-32.exe -J&amp;nbsp; &quot;C:\Reporting\Email.txt&quot;&#039;; I have no solution for this other than to forget about using Pegasus Mail for this, this commandline option is like using a sledge hammer to kill a fly.&amp;nbsp; Try Blat! instead.to send your file. BLAT&amp;nbsp; http://sourceforge.net/projects/blat DESCRIPTION: Blat is a Public Domain&amp;nbsp; Windows NT console utility that sends the contents of a file in an e- mail message using the SMTP protocol. Blat is useful for creating scripts where mail has to be sent automatically (CGI, backups, etc.) To use Blat you must have access to a SMTP server via TCP-IP. Blat uses the a DLL (&quot;gensock&quot; or &quot;gwinsock&quot;) from WinVN, the public domain usenet newsreader for windows. Blat can store a default SMTP server address and a default &quot;From:&quot; field in the registry. The server&#039;s address can be overriden using the -server flag, and the &quot;From:&quot; address using the -f flag. Input from the console (stdin) can be used instead of a disk file (if the special filename &#039;-&#039; is specified). Blat can also &quot;carbon copy&quot; and &quot;blind carbon copy&quot; the message. Impersonation can be done with the -i flag which puts the value specified in the &quot;From:&quot; line, however when this is done the real senders address is stamped in the &quot;Reply-To:&quot; and &quot;Sender:&quot; lines. This feature can be useful when using the program to send messages from NT users that are not registered on the SMTP host.&amp;nbsp;&amp;nbsp; Optionally, blat can also attach multiple binary files to your message.&lt;/p&gt;&lt;p&gt;You could also have your application write a message in final form directly to the queue.&amp;nbsp; Here&#039;s a sample, the message body only needs the required data.&amp;nbsp; This will be sent the next time Pegasus Mail sends the mail just like using the commandline mail option. &lt;/p&gt;&lt;p&gt;------------------------&amp;nbsp;&amp;nbsp; spam.101 ---------------------------- $$ cslaw@indirect.com tstephen@mtshasta.lmms.lmco.com support@tstephenson.com From: swallace@cyberpromo.com (Sanford Wallace) Organization: Ambulance Chasing, Inc. To: &quot;Laurence A Canter&quot; &amp;lt;spamford@wilhelp.com&amp;gt; Date: Fri, 17 Oct 2003 12:55:34 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Test Message Reply-to: &quot;Taylor Jimenez&quot; &amp;lt;taylor@wilhelp.com&amp;gt; CC: &quot;Martha S Siegel&quot; &amp;lt;Martha@smartbotpro.net&amp;gt; Priority: normal Message-id: &amp;lt;399917090.3123.1066456430@persephone.pmail.gen.nz&amp;gt; X-mailer: Pegasus Mail for Win32 (v3.12c) This is a test of the mail servers settings for spammers. Here&#039;s a little text file that you can use to test Mercury/32 or Pegasus Mail.&amp;nbsp;&amp;nbsp; With Mercury or Mercury/32 you save the file in the Mercury queue with the 101 extension.&amp;nbsp; With Pegasus Mail you save the message in the HOME mail directory with the PMX file extension. &amp;nbsp; This is a file in &quot;Glue&quot; headers format, the $$ line is the SMTP MAIL FROM: address, the next two lines are RCPT TO: addresses and the blank line is the separator from the RFC 2822 message body.&amp;nbsp; You can delete the Date: or Message-ID line in the message body, the SMTP relay host is expected to add these to the file.&amp;nbsp; Copy and paste the file to Notepad and then save it with the correct extension it the correct queue.&amp;nbsp; Modify the RCPT TO: &quot;Glue&quot; headers to use your own addresses. ---------------------------- cut here ---------------------------- &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft