1,105,450 Community Members

How to invite gmail contacts using gmail API and php??

Member Avatar
shahai.ali
Light Poster
48 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi i was trying the following to invite the list of contacts from gmail.

<html>
<body>
<?php
if(isset($_POST['submit']))
{
$email = 'https://mail.google.com/mail/feed/atom';
$sender = 'abc@gmail.com';
$send = mail($email, "Invitation", "Testing e-mail", "From: $sender");
echo $send;
}
?>
<form action='inviteList.php' method='post'>
<font>Invite your friends</font><br><br>
<font><b>Email: </b> <input type='text' name='email' size='30'><br>
<input type='submit' value='Invite' name="submit">
</form>
</body>
</html> 

but i got the following error:
Warning: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in D:\wamp\www\invite\inviteList.php on line 9

Member Avatar
pritaeas
mod_pritaeas
11,315 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 155 [?]
Moderator
Featured
Sponsor
 
0
 

Wamp does not have an email service installed. I think you could install Mercury.

Member Avatar
shahai.ali
Light Poster
48 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

sorry!!! Mercury??

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: