views:

16

answers:

0

Hi, I’m just the I.T guy at work any programming language is difficult for me.

Here’s my question I have found studied and now understand the following HTML code:

<a href='mailto:?Subject=ONDERWERP&Body=BIJLAGEN:&Attachment="C:\test\1.txt"  '> 

Attach with double-quotes! 

</a> 

However this invokes a new email with only one attachment. I can’t figure out how to add multiple attachments to the one email.

I had noted that perhaps HTML is not the best method, so I tried through the use of a batch files I came up with the following code:

@echo off
setlocal
set SMTPSERVER=mail.domain.com
set [email protected]
set [email protected]
set SUBJECT="Subject line"
set BODYMSG="Test in body "
::set ATTACHMENT=c:\filedir\file.txt (works)
set MAINDIR=c:\filedir
set COPYDIR=%MAINDIR%

:: Get current date.
for /f "tokens=1-4 delims=/ " %%i in ('date/t') do (

set DATE=%%l%%j%%k)

mkdir %COPYDIR%\%DATE%
xcopy /Y %MAINDIR%\*.* %COPYDIR%\%DATE%

for /f "tokens=1" %%i in ('DIR /A-D /O-D /B c:\filedir') do (set ATTACHMENT=%%i)

mailer.exe /zl %SMTPSERVER% /zt %TOEMAIL% /zf %FROMEMAIL% /zs %SUBJECT% /zb %ATTACHMENT% /zat %ATTACHMENT%;

del %ATTACHMENT%

Again woeful and didn’t work for me, besides this achieves exactly the same as the HTML code if it would work that is.

Dose anybody know how to achieve this. If you like further details to what I’m trying to achieve open up a PDF using Adobe and click the e-mail button, it only ever sends the one pdf newly opened pdfs cannot be included however this is what I need?