It didn't work. Turns out that the header is not all 1 line as it appears above.
Thanks for the help, though...it helped me work out a solution.
I did some more research and between last night and today (2 days off sick) I came up with a simple, but inelegant solution that almost does what I want it to. Eudora is used as the mail package simply because it saves the email as ASCII text and saves attachments in a separate directory. Cingular (my cellphone carrier) names picture attachments as "multimedia message.jpg"
The desired result is to mail a pic from my cellphone to myself and have it upload to my website...blog if you wish, and include the SMS message text with the photo. I copied the basic batch file from a website where the owner uploads his pictures in a link format. I didn't want that, so I modified the batch file to create the index.html file to directly display the pics. That portion works fine. However, just copying the message text to the index.html file brings all the header information with it and that was not acceptable.
So, after not being able to get Dias' script to work (I gave inaccurate parameters with my original question) I've got this, which requires that I have to start the text message with '..'. The double period is not found in any of the header information.
@echo off
:start
:: set the variables
set MAILDIR=c:\eudora\attach ::(your default directory goes here)
set WEBSITE=-----
set USERNAME=-----
set PASSWORD=-----
:: if there is no new picture, quit
IF not exist %maildir%\multim~1.jpg GOTO end
:: all subsequent functions will occur in the default directory
cd %maildir%
:: Finds the date and formats it appropriately
:getdate
date < NUL | find "current" > date.txt
for /f "tokens=1,2,3,4,5,6,7" %%a in (date.txt) do echo %%f > phone.date
for /f "delims=/ tokens=1,2,3" %%a in (phone.date) do set PHONEDATE=2008%%a%%b
:: finds the time and formats it appropriately
:gettime
time < NUL | find "current" > time.txt
for /f "tokens=1,2,3,4,5" %%a in (time.txt) do echo %%e > phone.time
for /f "delims=:. tokens=1,2,3" %%a in (phone.time) do set PHONETIME=%%a%%b%%c
:: sets the filename to the date and time and renames the picture to the new filename
:renamefiles
set PHONEFILE=%PHONEDATE%%PHONETIME%
rename multim~1.jpg %PHONEFILE%.jpg > NUL
:: appends the picture to the index.html and automatically sizes it to 800X600
:: right clicking on the picture gives the option of viewing it full size.
:addpicstomenu
echo ^<img style="width: 800px; height: 600px;" alt="" src="%PHONEFILE%.jpg"^>^<br^> >> index.html
:: grabs the text from the SMS message and strips the ".." from it. Then the text is appended to the index.html file and 2 line breaks are added.
:: this puts the text directly under the photo and leaves a couple of blank spaces before the next picture
:getpicturedescription
find ".." <c:\eudora\in.mbx> picturetext.txt
for /f "tokens=1-25" %%a in (picturetext.txt) do echo %%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m %%n %%o %%p %%q %%r %%s %%t %%u %%v %%w %%x %%y > phone.pic
for /f "delims=. tokens=1" %%a in (phone.pic) do set pictext=%%a
echo %pictext% > pictxt.txt
type pictxt.txt >> index.html
echo ^<br^>^<br^> >> index.html
:: ftp.txt holds the inputs for the ftp command to log in and upload the files to the web server
:ftpfilesup
echo open %WEBSITE%> ftp.txt
echo %USERNAME%>> ftp.txt
echo %PASSWORD%>> ftp.txt
echo put %PHONEFILE%.jpg >> ftp.txt
echo put index.html >> ftp.txt
echo quit >> ftp.txt
ftp -s:ftp.txt
:: deletes all the temp files
:cleanup
del phone.pic
del pictxt.txt
del picturetext.txt
del phone.date
del phone.time
del date.txt
del time.txt
del ftp.txt
del picture.jpg
del c:\eudora\in.mbx
:end
The above script is the final product. To make the script work as a blog source, I have the bat file set to run once every 5 minutes (lowest interval allowed by Vista's scheduling program) and Eudora is set to pull mail every other minute.
The whole script works like a champ and the only issue that I'll have with it is to remember to start all the messages I send with '..' or there won't be any text under the pictures. The only downsides are that I can't use a '.' at the end of a sentence or the rest of the message gets truncated and I'm limited to 24 words in the SMS message, but that's not an issue as descriptions should be short and sweet.
Like I said, it's not pretty, but it works. I've cleaned it up and posted the whole script here in case anyone wants to have a cell phone picture blog on their own website without having to play with some of the blogging software that is out there. Besides, being able to do a photo blog with your own hosting service means that you don't have to worry about 1 step of the commercial blogging industry going out of business and messing you up.