How to send Chat Invitation, to GTalk using PHP? - php

I want to send Chat Invitation to multiple users of Gmail, from my database list. How can it be done using PHP?
example: My data table contains some list of email address(i.e abc#gmail.com, def#gmail.com....), and i want to send all these email address an invitation from my end(i.e me#gmail.com or me#jabber.com)

You will want to take a look at this I believe, I've had it in my scrap book of things to play with for awhile so I can't offer much more advice than that.
http://code.google.com/p/xmpphp/

Related

How effectively send messages to a group of email addresses using a central address?

I have to set up an email sending solution, and I haven't yet figured out the best way to do this, I hope you have some ideas. I would like to achieve the following:
Have a central email address like mailinglist#mysite.com.
Behind this list there is a database of email addresses. I would like to be able to extend this list through an API. For example if a new user registers on my site, I want to add them to the list. Or if someone unsubscribes, I want to remove him from the list.
On my website I will place a button, and if the user clicks it their email client opens with the central address prepopulated.
If they send an email to this address, everyone will recieve it who is on the list.
If someone replies also everybody will recieve it.
(The application is written in PHP (Laravel framework) if that is important).
Do you know of any service where I can set up this kind of "mailing list", preferrably for free? (It would have a few hundred members, sending a somewhere around 30-100 emails a month.)
I guess you'll need root access to your (linux) webserver - then you can hook Sympa (read "list of features") into your MailTransportAgent (MTA) (postfix, exim) or whatever.

Email relaying with php | craigslist's anonymous email generator

I wanted to create (or at least learn/know how it is done) application(or configuration?) that does similar to what craigslist does when people choose to hide their email with the "anonymous" option when making posts. I suspect that it is done with what's called email relaying. I'd like to find out how it is done in process - from when user enter their email to receiving an email via an anonymous email address. I come from a "LAMP" background at an intermediate level so please bear with me and kindly explain.
Your responses/comments/suggestions/pointers are greatly appreciated.
Thank you
The easiest way to do this is to receive email with your php app. There are a wide range of ways to do this, collecting using cron, piping from an email server directly into your app or using a third party like CloudMailin.
I wrote a blog post explaining some of the methods you can use to receive incoming email using php here. The post discusses rails but the principals are the same for most languages and frameworks.

Sending "alert/notification" to cell phone from website

I was wondering if there was a way for a website to send an alert/notification to a cell phone (smart phone, android, iphone... stuff like that) where the notification will ask the user a question and they have to answer the question and the response is sent back to the website and their answer is logged in the database.
I would also like to know if this notification could have checkboxes? I am needing this for a project and would like to know if there is anything out there like this.
If you need more description, please let me know.
Thanks in advance!
Short of building an application for each specific phone to handle this alert, not really.
What I would do if I were you... allow users to subscribe to these alerts. When you send them, send them a link to a mobile web page. Now, keep in mind that most people don't have a data plan, or even know what to do with it. It would be best to allow replies over SMS as well. Without more details about what you are doing, it is hard to give a better answer.
Google around for an SMS Gateway. There are nearly infinite options with various pricing... so you will need to find the one best for you. Alternatively, you can send messages to the SMTP address. For example, 0123456789#vtext.com will send a text message to a Verizon customer with the number of 0123456789. SMS is more reliable though.
C2DM will solve this problem, for newer Android devices.

PHP script to send email invitations to join a site

Are there any popular scripts to send invitations to join a website, to user's address book contacts? When he enters email ID and password, it should grab all contacts and email each one using swiftmailer. I only need the grabbing part :)
thanks
What you want to do is to use the API offered by some mail services to retrieve contact information. This is specific per email service. Google, Yahoo and most of the other email providers offer their own set of API that is what you want to use.
In this StackOverflow thread are contained information on how to use these API from PHP.

Is It Easy to Make an Email Address Book Invite?

Twitter and Facebook invite new users to send an invitation to everyone in their Gmail, Hotmail, or Yahoo Mail accounts.
Is it easy to add this functionality to a website?
Thanks,
John
Last I checked you basically have to pretend to be a web browser then programatically log in to the site, scrape the contacts, then compose/send the message. It isn't difficult, but it is time consuming as each of these services works differently.
I does, however, look like people have written script for some of this though: example.
Yes!
What they generally do is to send in the email a special URL that contain a code, for example:
www.mysite.com?UserCode=ABC
That code (ABC) is associated to the email of the user so the application undestand which user is trying to subscribe. You must keep in a database the pair: email, code.
HTH
All of the above answers are correct, here is a summary and some more explanation:
You first need to get the user's login for each service you want to get contacts from (I personally don't understand why people would do that - I would never give my GMail password to Facebook, let along some little known web site).
Then you can simulate a login to the said website and grab their contact list as an export (all serious email services allow you to export the contact list as CSV or something). You can implement this yourself or use some external library such as contactgrabber mentioned by Haim.
You then go over their list of contacts and for each contact you generate a key (you want to generate a unique key for each email you send so you'd know who responded to you). Generating the keys is easy - take some info like the current user's email plus the target email address, add the current time and pass everything to a hashing function like SHA1 - should do the trick.
Now store in a database table for each contact you got: the inviting user's ID, the email address being invited and the key you generated.
Lastly send a nice email to each contact with a URL to your website's "invitation activation page" with the correct key applied - like so: http://www.somesite.com/invited?key=123456780abcdefgh
when that page is accessed, get the key from the URL and find it in the table - that would give you the email address that activated the invite and the user that invited them. From here you can take it to where ever you want.

Categories