Sign in to follow this  
Followers 0
ter-pierre

send mail

6 posts in this topic

Hi guys

Any one knows how can I send a mail with an attached file?

Share this post


Link to post
Share on other sites



thanks Chipbug.

I was trying to use MPACK, but i cant foud the correct syntax.

I am trying to send an CSV file attached.

Can you help me with the syntax?

Pierre

Share this post


Link to post
Share on other sites

You could use Blat to do that. There are already some udfs for that program around here. :o

Share this post


Link to post
Share on other sites

thanks Chipbug.

I was trying to use MPACK, but i cant foud the correct syntax.

I am trying to send an CSV file attached.

Can you help me with the syntax?

Pierre

Here is an example. Let's say you have a CSV file called "test.csv" and you have another text file called "msgbody.txt" that represents the body text of your email.

mpack -s "Test Message" -d msgbody.txt -c application/csv -o encoded.txt test.csv

This would create an encoded file call "encoded.txt" that combined your body text with the attachment (MIME type application/csv) with the subjust line "Test Message".

Then you could use BMAIL to send the encoded message:

bmail -s mail_server -t to_address@nothing.com -h -f from_address@nothing.com -m encoded.txt

Please note that MPACK and BMAIL seem to have problem with long file name. So make sure you sue 8.3 file name for all files passed to these programs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0