We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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

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

2
Contributors
2
Replies
15 Minutes
Discussion Span
6 Months Ago
Last Updated
5
Views
shahai.ali
Light Poster
48 posts since Aug 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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

pritaeas
Posting Prodigy
Moderator
9,534 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98

sorry!!! Mercury??

shahai.ali
Light Poster
48 posts since Aug 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0608 seconds using 2.67MB