{"id":10682,"date":"2007-03-23T21:33:27","date_gmt":"2007-03-23T18:33:27","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/2007\/03\/23\/sms-alerts-for-new-email-via-twitter\/"},"modified":"2007-03-23T21:35:16","modified_gmt":"2007-03-23T18:35:16","slug":"sms-alerts-for-new-email-via-twitter","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2007\/03\/23\/sms-alerts-for-new-email-via-twitter\/","title":{"rendered":"SMS alerts for new email via Twitter"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>As I have mentioned previously, <a href=\"http:\/\/www.twitter.com\">Twitter<\/a> has many uses.  Today, I used it to implement a quick and simple solution for SMS alerts.  A certain someone (a client of ours) wanted to receive an SMS message on his phone every time an email arrives to his mailbox.  Sounds simple, right?  Well, here in Cyprus we lack free and simple solutions for mass SMS messages.  So, it wasn&#8217;t so simple until Twitter came along.  Here is how I did.<\/p>\n<p>I&#8217;ve registered two new accounts on Twitter (they are free, aren&#8217;t they?).  One account is used for the client himself, and has his mobile configured, complete with &#8220;Don&#8217;t send SMS during these hours&#8230;&#8221; feature.  The second account is used by the mail server to send notifications.  Now, this second account is set to be protected in Twitter, so that only manually accepted people can follow and receive updates and notifications.<\/p>\n<p>Then I wrote a really really simple Perl script (I called it <a href='https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2007\/03\/twit_mail.perl' title='twit_mail.pl'>twit_mail.pl<\/a>).  Most of the work is done by a <a href=\"http:\/\/search.cpan.org\/~cthom\/Net-Twitter-1.03\/lib\/Net\/Twitter.pm\">Net::Twitter<\/a> perl module, so I didn&#8217;t have to do much.<\/p>\n<p>The script is designed to be used with mail aliases.  For example, if I was to use for user@mysystem mailbox, I&#8217;d create the following aliases in <em>\/etc\/aliases<\/em>:<\/p>\n<pre>\r\nuser:  user,twitter\r\ntwitter: \"|\/path\/to\/twit_mail.pl username password verbose\"\r\n<\/pre>\n<p>The first line here tells the system to copy an incoming message to another account &#8211; twitter.  This is needed so that the original email is received untouched by the user, and my twit_mail.pl script had something to play with.<\/p>\n<p>The second line creates a pipe alias.  Each message that comes to twitter@mysystem is piped to the twit_mail.pl script.  The script requires two parameters &#8211; username and password for Twitter account to use &#8211; and allows for verbosity parameter.  If verbose is set, then the script will send an informative status update to Twitter, something like &#8220;Message from a@b.com to user@mysystem about &#8216;some subject'&#8221;.  If verbosity is off, a generic &#8220;You&#8217;ve got mail&#8221; will be sent.<\/p>\n<p>You can easily find the appropriate lines in the script and change them for fixed values, if you only want to send notifications for one account.  I chose to go with parameters, so that I could use the same copy of the script for several accounts.<\/p>\n<p>Once you have the script set, aliases configured, and Twitter accounts created and linked, all you are left with is a test message.  And that&#8217;s about it.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>As I have mentioned previously, Twitter has many uses. Today, I used it to implement a quick and simple solution for SMS alerts. A certain someone (a client of ours) wanted to receive an SMS message on his phone every time an email arrives to his mailbox. Sounds simple, right? Well, here in Cyprus we &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2007\/03\/23\/sms-alerts-for-new-email-via-twitter\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SMS alerts for new email via Twitter<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1],"tags":[],"keyring_services":[],"class_list":["post-10682","post","type-post","status-publish","format-standard","hentry","category-general"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":10952,"url":"https:\/\/mamchenkov.net\/wordpress\/2007\/12\/04\/twitter-limits-outgoing-sms-to-250-per-week\/","url_meta":{"origin":10682,"position":0},"title":"Twitter limits outgoing SMS to 250 per week","author":"Leonid Mamchenkov","date":"December 4, 2007","format":false,"excerpt":"I just noticed that there is now a limit of outgoing SMS messages from Twitter to your mobile phone.\u00c2\u00a0 Current number is 250 per week.\u00c2\u00a0 Apparently, this was introduced some time ago (a couple of weeks?), but only noticed it now.\u00c2\u00a0 There is no mention of it in Twitter Blog.\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10856,"url":"https:\/\/mamchenkov.net\/wordpress\/2007\/10\/08\/send-sms-to-google-calendar-via-twitter\/","url_meta":{"origin":10682,"position":1},"title":"Send SMS to Google Calendar via Twitter","author":"Leonid Mamchenkov","date":"October 8, 2007","format":false,"excerpt":"I've already wrote about why I love Google Calendar so much.\u00c2\u00a0 One of the main features that makes the difference for me is that one of SMS reminders.\u00c2\u00a0 As unlikely as it seems, I'm not always behind the computer, but my mobile is always near by.\u00c2\u00a0 So reminding me of\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":24321,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/06\/08\/important-announcement-about-sms-notifications-in-google-calendar\/","url_meta":{"origin":10682,"position":2},"title":"Important Announcement about SMS notifications in Google Calendar","author":"Leonid Mamchenkov","date":"June 8, 2015","format":false,"excerpt":"Catching up with emails, I saw this email from the Google Calendar team: Starting on June 27th, 2015, SMS notifications from Google Calendar will no longer be sent. SMS notifications launched before smartphones were available. Now, in a world with smartphones and notifications, you can get richer, more reliable experience\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13394,"url":"https:\/\/mamchenkov.net\/wordpress\/2010\/09\/15\/twitter-is-not-a-social-network\/","url_meta":{"origin":10682,"position":3},"title":"Twitter is not a social network","author":"Leonid Mamchenkov","date":"September 15, 2010","format":false,"excerpt":"Just a couple of days ago I had a discussion with a friend of mine about Twitter. \u00a0He is not too much into social networks, but hearing all the time about Twitter, he decided to give it a shot again, and still felt that it was in no way suitable\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11751,"url":"https:\/\/mamchenkov.net\/wordpress\/2009\/09\/04\/daily-tweets-digest\/","url_meta":{"origin":10682,"position":4},"title":"Daily tweets digest","author":"Leonid Mamchenkov","date":"September 4, 2009","format":false,"excerpt":"My hosting company is on Twitter again. Welcome back @vaserv # I want to pay Twitter for SMS notifications. They were awesome. And no, I don't want to pay anyone else for this. # 'Clothes make a man' must the most stupid thing I've read off the t-shirt. And a\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10499,"url":"https:\/\/mamchenkov.net\/wordpress\/2006\/09\/27\/sms-support-in-google-calendar\/","url_meta":{"origin":10682,"position":5},"title":"SMS support in Google Calendar","author":"Leonid Mamchenkov","date":"September 27, 2006","format":false,"excerpt":"These are the greatest news I've heard for a while - Google Calendar expanded their SMS support for providers outside of USA. Particularly, Cyprus Telecommunication Authority (CYTA) is now in the list of supported providers. I have configured and verified my mobile phone, and it seems that notifications and reminders\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/10682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=10682"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/10682\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=10682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=10682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=10682"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=10682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}