0

Right this is stressing me out! I'm trying to connect to my gmail account through my website and I'm using this:

<?php
$server = "imap.gmail.com";
$user = "user@gmail.com";
$pass = "pass";
$conn = @imap_open("\{$server:993/imap/ssl}INBOX", $user, $pass)
or die("Connection to server failed: ". imap_last_error());
?>

(obviously with my own u/p) I have also enabled it in googlemail i'm using MAMP server. I get this error:

Connection to server failed: Can't open mailbox \{imap.gmail.com:993/imap/ssl}INBOX: no such mailbox

Any suggestions? :(

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by cwarn23
0

Although I haven't tried using imap with gmail I have heard of gmail api's that can be used (unofficial ones) where you can easily connect to gmail and send mail via gmail. So try googling for php gmail api or something like that.

0

If your using MAMP for Mac then although it would be harder to setup a program like mailman, api's should still work for remote smtp.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.