Community Discussions and Support
Command line to send an attachment

I had to scratch my head a little on this one - it's a while since I've used commandline delivery in WinPMail.

As best I can tell, there's no way of creating a window for a message from the commandline - you can only send the message. The usual intent with commandline operations is that they operate unattended, with no user interaction, and that's the way WinPMail's options work.

You could do this using the now ancient DDE interface in WinPMail (all these years on and I STILL haven't managed to understand COM well enough to implement it... *sigh*), but that would depend on your application being able to do that.

Another possibility (I haven't tried it though) is to use the WinPMail WSENDTO utility - just invoke it with the name of the file on the commandline and WinPMail should open with a new window set up with that file attached, waiting for you to address it. I don't think you can automate the subject if you do it this way, though.

Cheers!

-- David --

I had to scratch my head a little on this one - it's a while since I've used commandline delivery in WinPMail. As best I can tell, there's no way of creating a window for a message from the commandline - you can only send the message. The usual intent with commandline operations is that they operate unattended, with no user interaction, and that's the way WinPMail's options work. You could do this using the now ancient DDE interface in WinPMail (all these years on and I STILL haven't managed to understand COM well enough to implement it... *sigh*), but that would depend on your application being able to do that. Another possibility (I haven't tried it though) is to use the WinPMail WSENDTO utility - just invoke it with the name of the file on the commandline and WinPMail should open with a new window set up with that file attached, waiting for you to address it. I don't think you can automate the subject if you do it this way, though. Cheers! -- David --

I'm trying to create a new email with an attachment that will allow me to add an address and the body of the email.

The command line I have is:

-A  -F %IMGPATH% -B -S " PrintScreen Attached" 

The problem I have with this command line is it doesn't create an new email.  If I add the -T it creates the email but it puts it into the queue and doesn't allow me to change the address.

How can I make it so it will create an email and wait for me to put in an address?

 Thank you,

 

Docfxit
 

<p>I'm trying to create a new email with an attachment that will allow me to add an address and the body of the email.</p><p>The command line I have is:</p><p>-A  -F %IMGPATH% -B -S " PrintScreen Attached" </p><p>The problem I have with this command line is it doesn't create an new email.  If I add the -T it creates the email but it puts it into the queue and doesn't allow me to change the address.</p><p>How can I make it so it will create an email and wait for me to put in an address?</p><p> Thank you,</p><p> </p><p>Docfxit  </p>

> I'm trying to create a new email with an attachment that will
> allow me to add an address and the body of the email.
>
> The command line I have is:
>
> -A  -F %IMGPATH% -B -S " PrintScreen Attached"
>
> The problem I have with this command line is it doesn't
> create an new email.  If I add the -T it creates the email
> but it puts it into the queue and doesn't allow me to change
> the address.
>
> How can I make it so it will create an email and wait for me to put in an address?

You are using a sledgehammer to kill a fly, try using the right tool for the job.  ;-)

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.



>
>  Thank you,
>
>  
>
> Docfxit
>  


> I'm trying to create a new email with an attachment that will > allow me to add an address and the body of the email. > > The command line I have is: > > -A  -F %IMGPATH% -B -S " PrintScreen Attached" > > The problem I have with this command line is it doesn't > create an new email.  If I add the -T it creates the email > but it puts it into the queue and doesn't allow me to change > the address. > > How can I make it so it will create an email and wait for me to put in an address? You are using a sledgehammer to kill a fly, try using the right tool for the job.  ;-) 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. > >  Thank you, > >   > > Docfxit >  

Thanks for the suggestion. 

I don't see how Blat will solve the problem I need solved.

1.  I have a windows screen print program (Winsnap) that captures a screen.  I'd like to setup a way for it to send that screen via email.  The sender will change every time.  And I'd like to add some text to the body with an explanation of what the screen shot is.  I don't see how to do that with Blat.  Pegasus should allow me to create a new email and wait for me to fill in what I want.

2. The  "sledgehammer" I already have installed.  The "fly" is yet another program I would have to learn and maintain on my PC.  To me that is extra baggage that I currently have too much of already on my PC.

 

I'd really like to find out the correct command line that works with Pegasus since Pegasus was designed to do this job.

 

Thank you,

 

Docfxit  

<p>Thanks for the suggestion.  </p><p>I don't see how Blat will solve the problem I need solved.</p><p>1.  I have a windows screen print program (Winsnap) that captures a screen.  I'd like to setup a way for it to send that screen via email.  The sender will change every time.  And I'd like to add some text to the body with an explanation of what the screen shot is.  I don't see how to do that with Blat.  Pegasus should allow me to create a new email and wait for me to fill in what I want. </p><p>2. The  "sledgehammer" I already have installed.  The "fly" is yet another program I would have to learn and maintain on my PC.  To me that is extra baggage that I currently have too much of already on my PC.</p><p> </p><p>I'd really like to find out the correct command line that works with Pegasus since Pegasus was designed to do this job.</p><p> </p><p>Thank you,</p><p> </p><p>Docfxit  </p>

[quote user="Docfxit"]

Thanks for the suggestion. 

I don't see how Blat will solve the problem I need solved.

1.  I have a windows screen print program (Winsnap) that captures a screen.  I'd like to setup a way for it to send that screen via email.  The sender will change every time.  And I'd like to add some text to the body with an explanation of what the screen shot is.  I don't see how to do that with Blat.  Pegasus should allow me to create a new email and wait for me to fill in what I want.

 

That's not how Pegasus Mail, or most any other mail client works.  You have the save the screen print to a graphic in your application and then use your application to create the text to go with it and then send it via SMTP. 

 

2. The  "sledgehammer" I already have installed.  The "fly" is yet another program I would have to learn and maintain on my PC.  To me that is extra baggage that I currently have too much of already on my PC.

 

I'd really like to find out the correct command line that works with Pegasus since Pegasus was designed to do this job.

 

No, Pegasus Mail was not designed to do this via the command line.  You are creating the entire message that will be sent to the queue for sending in final form, very much in the same manner as is done with Blat!.  You can use the -J form of the command line to do this but you must have all of the information in place prior to sending via the command line.

 

Thank you,

 

Docfxit  

[/quote]
[quote user="Docfxit"]<p>Thanks for the suggestion.  </p><p>I don't see how Blat will solve the problem I need solved.</p><p>1.  I have a windows screen print program (Winsnap) that captures a screen.  I'd like to setup a way for it to send that screen via email.  The sender will change every time.  And I'd like to add some text to the body with an explanation of what the screen shot is.  I don't see how to do that with Blat.  Pegasus should allow me to create a new email and wait for me to fill in what I want. </p><p> </p><p><b>That's not how Pegasus Mail, or most any other mail client works.  You have the save the screen print to a graphic in your application and then use your application to create the text to go with it and then send it via SMTP.  </b></p><p> </p><p>2. The  "sledgehammer" I already have installed.  The "fly" is yet another program I would have to learn and maintain on my PC.  To me that is extra baggage that I currently have too much of already on my PC.</p><p> </p><p>I'd really like to find out the correct command line that works with Pegasus since Pegasus was designed to do this job.</p><p> </p><p><b>No, Pegasus Mail was not designed to do this via the command line.  You are creating the entire message that will be sent to the queue for sending in final form, very much in the same manner as is done with Blat!.  You can use the -J form of the command line to do this but you must have all of the information in place prior to sending via the command line. </b></p><p> </p><p>Thank you,</p><p> </p><p>Docfxit  </p>[/quote]
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