Forum Moderators: coopster
1.Automate opening an attachment from an email that I will be getting everyday.
2. Running a script (which I already have) on that attachment ( the attachment is going to be a .csv file).
3. Then after that script has run, that script will produce a different .csv file. I need to then automate running a script again on that file. ( I already have that script ready too).
4. The result of step 3 will be stored in a folder ( say under C:). I then need to automate the email distribution of that file to few people.
I know that I cannot use Cron for any of these purposes since I am using Windows. If someone can even help me with any number of steps above, I will be grateful.
I had assumed you were planning on basing you script on PHP as this is the PHP forum?
C:\php-5.2.6-Win32>php.exe C:\emailattachmentscript.php
PHP Fatal error: Call to undefined function imap_open() in C:\emailattachmentscript.php on line 9
I uncommented the 'extension=php_imap.dll' line in the PHP.INI file, but it still did not get rid of the error.
I also pasted the php_image.dll file under the folders: C:\WINDOWS\system32 and C:\WINDOWS\system, but it still did not get rid of the error.
C:\php-5.2.6-Win32>php.exe -f C:\emailattachmentscript.php
PHP Warning: imap_open(): Couldn't open stream {EMAIL03.cerner.net}INBOX in C:\emailattachmentscript.php on line 17
Could not open Mailbox - try again later!PHP Notice: Unknown: Can't connect to EMAIL03.cerner.net,143: Refused (errflg=2) in Unknown on line 0
I tried searching online but cannot find the reason for this.
C:\>telnet EMAIL03.cerner.net 143
Connecting To EMAIL03.cerner.net...Could not open connection to the host, on port 143: Connect failed
Here is the part of my script that is causing the headache...
$mbox = imap_open("{EMAIL03.cerner.net}INBOX", "albert_newton", "****") or die("Could not open Mailbox - try again later!");
( where **** is my network password to log into the system.)
I am using Microsoft Outlook 2003 and looking into the tools-> email accounts setting, I see that the Microsoft Exchange Server computer name is set as EMAIL03.cerner.net. Hopefully I have the right parameters for the imap_open function.
telnet pop.gmail.com 995
and also tried: telnet pop.mail.yahoo.com 110
But it still gives me the following error message:
Could not open connection to the host, on port --- : Connect failed
I tried adding exception for telnet and for those ports from the Windows Firewall program under control panel, but looks like this did not make any difference. Any ideas?
Remember your router probably has its own firewall. Try, just for a minute, disabling this. If things start working, then you know you need to configure exceptions in there.