Sending attachments gives error 816 - invalid arguments

34 views
Skip to first unread message

jhv...@gmail.com

unread,
Mar 13, 2014, 11:11:43 AM3/13/14
to mailsend...@googlegroups.com
I'm using Mailsend version 1.17b14
I'm able to send an attachment when the file resides in the same folder where Mailsend executable is (-attach "pricelist.pdf").
But when I use a path in the file name (-attach "d:\temp\pricelist.pdf") I get:

Error: smtp.c (816) - Could not open file for "d:\temp\pricelist.pdf" reading (Invalid argument).

I've also tried the 'mime-type' syntax ("pricelist.pdf,application/pdf,a") but that doesn't work either.
The entire command string is:

D:\smtp\mailsend.exe -to externaladdress -from internaladdress -sub "TEST EMAIL13
MAR 2014_09:58" -starttls -port 587 -auth -smtp mysmtpserver.com -user
internaladdress -pass xoxoxoxo -attach "d:\temp\pricelist.pdf"

I obviously changed addresses, servers & password for this posting.
My goal is to create a basic program that creates & executes the SendMail command so I can automatically send my customers their invoices via email.
I'll appreciate any guidance on this.

Joel

Muhammad Muquit

unread,
Mar 13, 2014, 8:52:26 PM3/13/14
to mailsend...@googlegroups.com
If you are calling mailsend from another program, you have to escape back slash e.g.  "d:\\temp\\pricelist.pdf" or use forward slash, e.g. d:/temp/pricelist.pdf

Thanks.
Reply all
Reply to author
Forward
0 new messages