Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

sendmail question

I am using TCMD 10..... under XP Pro sp3

If I have too many attachments for an email as it comes back with "Command line too long" - besides making a ZIP and sending that instead how else can i send a large number of attachments?

========================echo . > "%USERPROFILE%\desktop\a.err"
for %fldr in (@dirlist.lst) (
Echo Working on %Fldr...
cdd "%fldr"
(for %fn in (*) set cAtt=%cAtt /A "%fn") >>&> "%USERPROFILE%\desktop\a.err"
echo sending email now...
sendmail %cAtt /d "[email protected]" "%fldr" for your pleasure
unset cAtt
delay 120
cdd -
)
========================
 
[email protected] wrote:
| I am using TCMD 10..... under XP Pro sp3
|
| If I have too many attachments for an email as it comes back with
| "Command line too long" - besides making a ZIP and sending that
| instead how else can i send a large number of attachments?
|
| =======================| echo . > "%USERPROFILE%\desktop\a.err"
| for %fldr in (@dirlist.lst) (
| Echo Working on %Fldr...
| cdd "%fldr"
| (for %fn in (*) set cAtt=%cAtt /A "%fn") >>&>
| "%USERPROFILE%\desktop\a.err" echo sending email now...
| sendmail %cAtt /d "[email protected]" "%fldr" for your pleasure
| unset cAtt
| delay 120
| cdd -
| )
| =======================
You could keep track of the command line length (via the length of variable
cAtt) as you build cAtt, and use sendmail multiple times, until all files
are sent. I would also check the relevant RFC to learn about the limit on
the number of attachments, if any, a mail server and client are required to
deal with to conform to WWW standards. You may also neeed to check your
ISP's policies about the frequency at which it accepts outgoing mail.
--
HTH, Steve
 

Similar threads

Back
Top