Found the problems.
Replace lines :
$smtp->datasend("--frontier\n");
with
$smtp->datasend("\n--frontier\n");
Swap the 2 following lines :
$smtp->datasend("Content-Disposition: attachment; filename=\"$csvfile\"\n");
$smtp->datasend("Content-Type: application/text; name= $csvfile ");
And finally, replace
$smtp->datasend("Content-Type: application/text; name= $csvfile ");
with
$smtp->datasend("Content-Type: application/text; name=\"$csvfile\"\n");
In reply to Re: Send mail with attachment using only SMTP
by Mad Ant
in thread Send mail with attachment using only SMTP
by Mad Ant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |