See if you can connect using this?
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$username = 'someone@gmail.com';
$password = 'yourpassword';
/* try to connect */
$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());
[quote name='justsomeguy' timestamp='1324408390' post='228791']
Which parts do you need help with? I have a better mail checking script at home I can post later that will handle different encodings, multiple email parts, attachments, etc.[/quote]
It is not a g-mail account, it is a private e-mail on my server. Though I don't know how to find out the imap host for it in cpanel.
This is how it the news block looks:
http://i44.tinypic.com/2rwuo1u.jpg
Lets say the e-mail is aligned to like this on particular lines so the script would know which line would go into which column in the table.
From: [email]admin@example.com[/email]
To: [email]newsfeed@example.com[/email]
Subject: Test News Article! <--- This would serve as the caption and uri for the news article, and would go into the caption column and uri column.
test news article <--- (Line 1:) This line would be for the tags that get inserted into the tags column
12/20/2011 <--- (Line 2:) This line would go into the date column but would have to be converted to Unix timestamp
(Line 3, based on line breaks,) Would be the message that gets inserted into the content column, and the first line only would automatically be inserted into the snippet column
Hello. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
How could i attain this?