Jump to content

Reading email from external email account

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,674 posts
Hi Guys,
its been a long time since ive asked for help here :amr:, dont worry i googled the hell out of this before coming here
problem overview
im working on a google calendar integration inside a custom php website im working on, where users have username and password to access the calendar. the google calendar needs a google email account for each user to let them add events and other stuff.
i dont want that, i want my users to use their login and password used on my website because most of them dont have email, so im thinking of creating an email on google with the name "<somemail>@gmail.com" and everytime a user opens the calendar the google calendar uses that email without asking user for any input
the question
the google calendar sends notifications to certain users participanting in certain events so i want to make a cronjob that
-logs in to the email "<somemail>@gmail.com"
-reads/parse the new email messages
-sends a message and email to the system user specified in the email message
is that possible? can i access an email from outside? most search results got assume im accessing emails on the same server
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript

#2
Feral

Feral

    Programmer

  • Members
  • PipPipPipPip
  • 162 posts
Yes is is very possible to access google from the outside and get all your messages using IMAP David Walsh has a nice post about doing it over at his blog you will have to forgive him for throwing in the mootools stuff hes one of the core team members and throws it into everything.

As for the logging into google remotely to access the calender I'm still trying to figure that out myself since joe2010 posted a question around the same lines as that a couple of days ago.

Edit:

Now that I took a quick look ever at the google calender api page its not that hard to do for the calender (that is if you are using the api)

Quote

ClientLogin username/password authentication

ClientLogin authentication is much easier to use than AuthSub because it does not require redirecting the user or doing a token exchange. However, ClientLogin is designed to be used only with installed applications or in cases where only a single calendar is being accessed with hard-coded credentials.

The following code uses the Zend_Gdata_ClientLogin::getHttpClient method to perform a request to the ClientLogin service, retrieve an authentication token and create a Zend_Http_Client object with the appropriate Authentication header.

$user = 'user@gmail.com';
$pass = 'myPassword';
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name for calendar

$client = Zend_Gdata_ClientLogin::getHttpClient($user,$pass,$service);
Note: You will need to replace the values of $user and $pass with the username and password of the Google Account whose calendar you will access.


#3
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,674 posts
thnx for the reply,
ive also read alot about google calendar authentication but in javascript, i think i found a bug in it and reported it here, i think im going nuts
last thing i want to do is to add the zend library for just a calendar , but thnx alot for your response, ill try to use the code you posted above now
+rep
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript

#4
Feral

Feral

    Programmer

  • Members
  • PipPipPipPip
  • 162 posts
Yea i totally agree with you on adding a the whole zend lib just for a calender, I hope that you get everything working. If i can be of anymore help just let me know :)

#5
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
I believe there is a stand alone version of Zend Gdata

#6
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,674 posts
in the download page theres the option to download the zend gdata only in case that you have the zend library
or you can download the whole zend library, i havnt noticed a standalone version :(
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript