I am trying to write a program in Ruby that can send a email to a phone. Outside of the program, I am able to do this by sending an email to xxx-xxx-xxxx#vtext.com or any other carrier in my Apple Mail client, and it worked fine; it sends a text message to the targeted phone, but when I tried to use a Ruby API (I forget the name), that used sendmail, to send a message, it would not send the message. Are there any ruby APIs that can send an email to a phone? (Or can someone just list some different Ruby mail APIs that I can try)?
I've used ActionMailer and Pony (http://github.com/benprew/pony) in the past.
it should "just work" assuming your mailing system/settings are setup right.
Related
How can I send email to email address like महाराजा#test.com? I am using spring and java mail for sending emails. I get exception javax.mail.internet.AddressException: Local address contains control or whitespace in string while sending the email.
Unfortunately javax.mail does not yet support the RFC 653x family of standards that enables internationalised e-mail addresses. Bug tracker
Actually right now very little internet mail infrastructure supports it, so you're probably not missing much, yet.
I have postfix and dovecot running on a server. When a certain kind of email comes in for accounts on the domain, I'd like an SMS to go out. I already set this up for one user using Postfix's BCC mapping and the "SMS email addresses" provided by the tel co.
However, here in the post-Snowden world, with heightened awareness of how easy SMS apparently is to hack, and with potential issues with long emails being sent via SMS, we want the SMS to just say "you got an email" or something like that. We don't want to BCC the entire email message via the SMS system. That's what email is for; we just want the SMS to be an alert, like the way pagers were used in the old days. I suspect there should be a way to do this but it might take me days to learn enough about procmail or script piping and postfix gateways to figure it out.
I would be surprised if I was the first person in the world to want to send an SMS alert on email events?
So the BCC is apparently not a problem. The email-to-SMS is apparently not a problem. The problem is how to modify the body of the BCC'd email, or otherwise how to send a simple SMS alert (or simple email alert) upon certain email events (specifically, when email is received for certain recipients on the server via postfix).
Thanks!
You may use dovecot's sieve with enotify or vnd.dovecot.execute.
Simple enotify can deliver exactly what you have asked for. Dovecot specific vnd.dovecot.execute can be used to implement extra protections to avoid turning mail bombing into SMS bombing.
Example from RFC5435:
require ["enotify"];
if header :contains "from" "boss#example.org" {
notify :importance "1"
:message "This is probably very important"
"mailto:alm#example.com";
}
Hi I am using the bellow function, can you please guide me how can I use Mail::failures(); in it
Mail::send('emails.caregiversetprimary', $templateArray, function($message)use($email)
{
$message->to($email, 'username')->subject('my subject');
});
Mail::failures(); < ====== this gives me black array as I have used wrong email
I am using laravel 4.1
tl;dr
You can know which recipients the email has been sent to but no which recipients have received it.
details
You need a better understanding of how mail servers work. From a Laravel point of view, there is no way (or at least not a simple one*) of knowing which recipients got the email. Its a matter of how mail protocol works. You may know which recipients the message has been sent to but no which recipients actually got it.
With Mail::failures() you get a list of recipients to which Laravel tried to send the email but it failed on actually sending it. But again, if it has been sent there is no straightforward way to known if the mail reached their inbox or no.
*If you happend to use Mailgun, Mandrill or any other 3rd party software then you are not dealing with a mail server 'per se' but with an API service. May be you could check the mail service provider documentation to research if they perform any kind of delivery tracking that you can programatically check.
I need my application to send an e-mail to me directly without using the EmailComposeTask.
I also don't want to use a webservice for that.
Is there any open-source framework I could use?
There is currently not a way to send email w/o user input unless you want to send some information to a service and have the service send the email
My WP7 application requirement is to send the email with an attachment and use device default SMTP settings.
I have tried EmailComposeTask class but it doesn't have any member for attachment.
The other idea, i am thinking is to upload the file on server and then send the email from that server.
What you think if there is no way to send the email with an attachment using WP7 API?
Your observation is correct, at this point in time EmailComposeTask doesn't support attachments and this is the only facility to send email programatically from the device at the moment.
As you note, you can communicate with a server which can perform this task on behalf of your app.
I found a wp7 and wp8 library that does it: http://www.windowsphonegeek.com/marketplace/components/livemailmessage
Try to create web service to send mail in your webserver. so, we can call the from your app to send mail.
I hope upcoming version it will be possible!
Please check this URL for more details http://forums.silverlight.net/forums/p/209808/493532.aspx
I've found this article, but I did not make any test yet.
From the author:
EmailComposeTask won’t allow you to send attachments, but this doesn’t mean that you cannot send files through it. .NET Framework has these two amazing methods: Convert.ToBase64String and Convert.FromBase64String. The first will allow the developer to convert a byte array (byte[]) to a Base64-encoded string, the other one will do the same operation in reverse.
Reference:
Pushing the Limits of the Windows Phone SDK and Sending Files via EmailComposeTask