Talk:Notifications.sendEmail

From Facebook Developers Wiki

Jump to: navigation, search

Contents

[edit] changing daily limit for testing?

Is there anyway to exceed the 5 Emails per day limit for testing purposes with my own account?

Is there any way to exceed the 5 emails/day limit for a "Facebook Platform Developer Test Accounts" account??


Despite what is said on the wiki page, you must specify both :text and :fbml, though you can leave one of them blank. If you fail to specify one of them, the API call will report success but no email will be sent.

Specifying only fbml works for us.

Is there a limit to the number of characters for text or fbml?


Which FBML elements work? I've had users report that <fb:name uid="1234" /> is coming through as plain text? I take it back - but watch out, the subject doesn't take FBML!


The subject line doesnt seem to take fbml tags! Is there any way to include a person's name in the subject line?

   $userInfo = $facebook->api_client->users_getInfo($user, array("first_name", "last_name")
   $subject = $userInfo[0]['first_name'] . " " . $userInfo[0]['last_name'] . " has an exciting message for you...";

[edit] multi-part encoding exposed in all messages

Anyone know why all my emails show up with all of the multipart encoding info exposed? i.e. before my html/fbml message, I get:

University!
Message-ID: <3453a578169f2003ec3db7d11cb1347a@api.facebook.com>
X-Priority: 3
X-Mailer: ZuckMail [version 1.00]
X-Facebook-Notify: platform_email
Errors-To: apps+plovhpe@facebookmail.com
MIME-Version: 1.0
Content-Type: multipart/alternative;
        boundary="b1_3453a578169f2003ec3db7d11cb1347a"


--b1_3453a578169f2003ec3db7d11cb1347a
Content-Type: text/plain; charset = "UTF-8"
Content-Transfer-Encoding: 8bit

This message contains a rich-text HTML portion. Consult your mail client's documentation for infomation on how to view it.


--b1_3453a578169f2003ec3db7d11cb1347a
Content-Type: text/html; charset = "UTF-8"
Content-Transfer-Encoding: 8bit
Keep an eye out for carriage returns in the strings you put in subject lines. A carriage return in a subject causes mail agents to think the headers have ended prematurely.

[edit] Replies goes to?

What happens to the any email replies that the user might send? In my case it goes to <apps+oj424ct6@facebookmail.com> but I don't see it. It this address just a black hole?

I just sent myself an email from my own app, and compared it to an email from someone else's app. They both have the same reply address, although it differs from the one you mention. I'd guess it's some sort of hash based on your username, or something. Notification emails I receive include the same hash -- e.g. notification+SAMEHASH@facebookmail.com. Since it's per user, and not unique on a per-app basis, I'd guess that facebook staff, if anyone, are the only people who get to see replies.

[edit] Accents in email's title

Accents converted to html (like é -> &eacute;) are not converted in email's title.
If you leave these characters unconverted, it will appear ok on gmail, but it will be replaced by a question mark in hotmail, and in Thunderbird nothing the title is replaced with a question mark!

In email's fbml body, you have to convert accents to html. Strange behavior...

[edit] Limit to users-per-call?

It seems like there may be some arbitrary limit to the number of users you can email with a single call (I'd estimate somewhere around 100-200)

has anyone else experienced this? Also, is anyone aware of a way to find out, via the API, which users you have permission to email?

--- I've read somewhere the limit is 100, So i send in batches of 90. --- There is a limit documented on the API page for Notifications.sendEmail. It is 100.