How to send Outlook email from a batch script?

S

SeanCannon

Hi. Am trying to send email from a batch file ( .bat) but am finding it
difficult to use 2 switches /a (attachment) and /m (mailname) together.

The following work perfectly as separate commands:
start outlook /c ipm.note /a %vulctrfnm%
start outlook /c ipm.note /m (e-mail address removed)

But when I combine them as follows:
start outlook /c ipm.note /m (e-mail address removed) /a %vulctrfnm%

I get an error message "The command line argument is not valid. Verify the
switch you are using"

The aim is to produce a single addressed email with an attachment. Oh, and
a subject line too, if possible.

It seems the switches are documented - but I don't see one for subject line.

Any suggestions?
Regards
SeanCannon
 
S

Sue Mosher [MVP-Outlook]

Is (e-mail address removed) always the recipient used for this operation? If so, create a published message form with that person as the recipient, thus:

start outlook /c ipm.note.my_custom_form /a %vulctrfnm%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top