jakebur01 Posted July 1, 2011 Share Posted July 1, 2011 Is there a reliable way to have php process e-mails for a gmail account. I need it to look at all the new e-mails that have VSI-FAX in the subject and run the code below to swipe out the failed fax number. These are fax failure e-mails. $pattern = '~fax\s+#\s+:\s+\K(??!from).)+~i'; preg_match($pattern, $email_body, $matches); $fax_number = trim($matches[0]); Quote Link to comment https://forums.phpfreaks.com/topic/240900-php-e-mail/ Share on other sites More sharing options...
mikesta707 Posted July 1, 2011 Share Posted July 1, 2011 One way would be to use PHP's Curl library. Here is an introductory Tutorial: http://phpsense.com/php/php-curl-functions.html Here is a topic about logging into gmail via Curl: http://stackoverflow.com/questions/4748166/how-to-login-to-gmail-through-with-curl the link that topic points to about using curl and the command line to check your gmail emails: http://www.commandlinefu.com/commands/view/3380/check-your-unread-gmail-from-the-command-line I'm not familiar with the process myself, so I cannot give you any concrete code examples. Quote Link to comment https://forums.phpfreaks.com/topic/240900-php-e-mail/#findComment-1237443 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.