Get files, zip files, then email files script

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
wdheneghan
Newbie
Posts: 4
Joined: Wed Nov 16, 2005 3:33 pm
Location: Canada

Get files, zip files, then email files script

Post by wdheneghan » Wed Nov 16, 2005 3:55 pm

Hey...I know that some of these issues have been dealt elsewhere in the forum BUT I am having problems.

I have created a html coded page that goes to Nav Canada website and loads the current weather radar, weather map, etc images. I then save these images to my HDD, zip them into a single file and attempt to send this zipped file to 2 email addresses using the SMTPSendMail macro. The email goes fine but the attached file doesn't. I can use the same smtp server via Outlook and send the same file to the same addresses so I know this isn't a filesize issue. When in a modified script, I attempted to send several files as attachments, with each filename separated by a semi-colon, only the first file in the list was sent.

Here is my script:

//Deleting old zip file
Let>filename=d:\wxsavefiles\wxfilesbackup.zip
DeleteFile>filename
//
//Running the Winzip Macro
//
Run Program>c:\Program Files\WinZip\Winzip32.exe
WaitWindowOpen>WinZip
Press CTRL
Send Character/Text>n
Release CTRL
Wait>5
//
Send Character/Text>d:\WxSaveFiles\wxfilesbackup.zip
Wait>5
Press Enter
Wait>5
Send Character/Text>D:\WxSaveFiles\wx_files\*.*
Press Alt
Send Character/Text>w
Press Alt
Wait>5
Press F4
Wait>5
//
//Sending email
//
Let>SENDMAIL_STATUS=1
PlayWav>chimes.wav
Hour>hour
Minutes>minutes
Month>month
Day>day
Year>year
Let>subject=Latest email images
Let>me=[email protected]
Let>myname=EMS Weather Guy
Let>recipients=[email protected];[email protected]
Let>body=Here are the latest weather images in a zipped backup format as provided by NavCanada for %hour%%minutes%_hrs_%day%_%month%.
Let>attachments=D:\WxSaveFiles\wxfilesbackup.zip;
SMTPSendMail>recipients,mail.onlink.net,me,myname,subject,body,attachments
PlayWav>chimes.wav


Anyone can help me??

Walter
skype me at walterh

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Wed Nov 16, 2005 10:44 pm

What Happens When You Drop The ; At The End of The Attachment.

Old Code
Let>attachments=D:\WxSaveFiles\wxfilesbackup.zip;

Replace
Let>attachments=D:\WxSaveFiles\wxfilesbackup.zip

Can You Also Post The SMTP Result?
FIREFIGHTER

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Nov 16, 2005 11:00 pm

CyberCitizen,

I thought the same thing regarding the semicolon at the end. Earlier today I tested it and sent an attachment having a trailing semicolon with no problem. But otherwise, I don't see anything wrong with the script as posted. I don't have WinZip so I haven't tested it

Sorry, no help here.

wdheneghan
Newbie
Posts: 4
Joined: Wed Nov 16, 2005 3:33 pm
Location: Canada

Post by wdheneghan » Wed Nov 16, 2005 11:42 pm

Thanks for the reply...

The script works fine, and shows the sending mail box in the upper LH corner of my screen, scrolling numbers up to 1130034 or so...the file size is 1231 KB.

Result of SendMail: 250 Mail queued for delivery.

Then my Norton shows it as being scanned, and the time it takes to scan the file appears consistent with a 1.2MB file.

But it does not arrive at it's assigned email address..:(
skype me at walterh

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Nov 18, 2005 12:51 pm

Sounds like Norton is acting as a proxy mail server and Macro Scheduler is getting a 250 success response from Norton. Norton is then failing to pass the message on to the actual mail server.

Would be interesting to see what response you get if you disable Norton temporarily. Do you still get 250? You may get a failure.

Your mail server may require you to authenticate. If so use:

Let>SMTP_AUTH=1
Let>SMTP_USERID=your_username
Let>SMTP_PASSWORD=your_password
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

wdheneghan
Newbie
Posts: 4
Joined: Wed Nov 16, 2005 3:33 pm
Location: Canada

Post by wdheneghan » Sat Nov 19, 2005 1:36 am

Makes no difference...

I cannot send multiple attachments
I cannot send the zip file
BUT
I can, using a single script, reset the variables and send 12 different emails with 12 different messages and 12 unique attachments!!!!

Not ideal but workable.

Walter
skype me at walterh

wdheneghan
Newbie
Posts: 4
Joined: Wed Nov 16, 2005 3:33 pm
Location: Canada

2 years and many new browser versions later ...

Post by wdheneghan » Sun Aug 23, 2009 2:15 am

The previous script won't work with either IE8.0.6001 or Chrome 2.0172.39 so I created a new, simpler script that will bring me to the summary page but will not allow me to select all the checkboxes, then go to the Print Preview or save the resultant page. Any tips?

____________________

// C:\Documents and Settings\Walter Heneghan\Application Data\Macro Scheduler\Cador Aug 23.scp
// Recorded on Saturday, August 22, 2009, at 12:10 PM

// Run program and wait for it to be active
//
Run Program>C:\Program Files\Google\Chrome\Application\chrome.exe http://www.tc.gc.ca/aviation/applicatio ... hquery.asp
Wait>2

Press Tab*5
Wait>1

VBSTART
VBEND
VBEval>Year(date-60),yyyy
VBEval>Month(date-60),mm
VBEval>Day(date-60),dd

Let>Date1=%yyyy%/%mm%/%dd%
Send>Date1

Press Tab
Wait>.1
Press Tab
Send>A
Send>A
Press Tab
Wait>1
Send>S76
Press Tab*4
Wait>.1
Press Tab
Wait>1
Press ENTER

Wait>4
PushButton>CADORS - Word/Text Search Summary Results,&Home
Press Enter
//
// Now I want to Select All the boxes and go to Print Preview.
// Print preview opens in a new tab, which I want to save as a file
// CADORS Summary %date%.html
//
// Any tips?
skype me at walterh

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts