Sample Header Ad - 728x90

How to force base64 encoding for s-nail attachments?

0 votes
1 answer
772 views
I have a job that picks up CSV files and sends them through an external mail service. Everything seems to be great, with one exception: I found that the windows style CRLF CSV files get mangled by the process and when I open them in a mail client, they have 3 0x0A characters at the end of each line. I thought it would be easy to force base64 encoding of the files, but though it feels like s-nail should be a Ferrari from a programmability perspective, I can't find the gas pedal. Playing around with the mime settings, I can change the content type, but getting the payload to base 64 is just not happening.
echo "CSV files attached:" | s-nail -vv -Smimetypes-load-control -X'mimetype "application/octet-stream csv"'  -r noreply@example.com -s "Your CSV file" -a /data/review/fun.csv  -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user="butts@corgibutts.com" -S smtp-auth-password="yourmom" -S smtp="corgibutts.com:587" "user@example.com"
Does anyone have any idea how to make this happen?
Asked by lopass (79 rep)
Sep 28, 2022, 08:54 PM
Last activity: Oct 5, 2022, 03:32 PM