Adding new contact using mailgun in rails - email

I am trying to build app where users can subscribe for new updates.
My mailer is configurated with mailgun. Everything works fine except when I try to add new user with this method (as in official document): http://documentation.mailgun.com/user_manual.html#mailing-lists.
Honestly I have no idea how to send email adress from form directly to add_list_member(mail) without saving it to my database.
I will be grateful for any help!

Create two fields in your form
Name
Email
On Form's submission you send the input from the user to your backend for processing.
The backend takes the form's input, makes a few check to ensure the email is correct and not mispelled.
If the above is successful your backend pushes the email address and name to a mailing list, for reference that's something which you can create with the API or from the control panel (https://www.mailgun.com/cp/lists?domain=YOURDOMAIN.COM)
Then you just email the address provided in the email list

Related

sendgrid/mail wont allow sending 'from' to be dynamically

I have a form on my portfolio that allows a user fill in a form with a question they have and send that to me by email.
When i try to use sendgrid it only allows me as a verified user to send emails from my own email address. but i want the 'from' field to be dynamically filled in by that user and then sent to me.
note: I also tried 'emailjs' but that works fine in development but fails in production.
Any suggestions on how to fix this or any other platforms i can use for that preferabally free since it is a hobby project.
Thanks
Twilio SendGrid developer evangelist here.
You do need to use a verified email address to send emails from SendGrid, this is to stop people using a form like you describe to spoof anyone's email address.
A better idea is to send emails created in your form from a verified email address and set the reply-to address as the submitted email. That way you can send with SendGrid and then when you reply in your email client it will return to the person that submitted the form.
I added more detail and example code (in Python) in this answer.

how do i email form submissions through url's

I would like to set up a form on my Shopify website. I want the content of the form to be sent to me via email. So I would like to use the get method and set the forms action attribute to a URL that will send me an email with the submissions.
The question is, how do I send an email through URL's? Or do I need to use API for this? Is it possible at all? Or is it gonna be possible for me to submit the form to a mystore.myshopify.com page?
I have already tried searching some similar questions, but nothing was satisfying.
Sending an email is something that is done on a back-end of the server. With Shopify it's not possible because you don't have access to the back-end.
But the default Shopify contact form does send you an email when it's submitted, so you can use it. You can modify its fields, copy it to other pages, etc.
If you want more customization options, or more control you'll have to use a service. Shopify recommends Wufoo or Jotform. But you can use whatever you like.
One additional thing. If you have a server somewhere where you can access the back-end, you can send your form data there and email it yourself with PHP or any other language that can run there and send emails.

How can I send a form by email with titanium

I have seen the email dialog example and also the email dialog example, but I am not looking for an email client interface.
I also took a look at the pizza ordering app, and I couldn't find any method for the send button.
I have custom text fields and in the end I want to send the whole form to an email recipient. I can't find the way to do that.
That is, I would appreciate your help.
For sending E-mail from your app , you have these options :-
1- Using Titanium.UI.EmailDialog .
The Email Dialog is created with the Titanium.UI.createEmailDialog method. The user needs to register an e-mail account on the device in order to open the dialog. The dialog will not open when there is not a registered e-mail account.
Ex : Android
Read more http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.EmailDialog
But As you said you don`t want like this ! and if you want to send direct messages from your app please see these other options :-
2- Make any backend service like #PHP to send email
for ex:- http://www.w3schools.com/php/func_mail_mail.asp, and using Titanium.Network.HTTPClient to connect with your backend service .
3- Using ArrowDB
Enjoy !
Follow these steps,
1) Create webservice method to send email.
2) Call particular email method in the button click.
Note :
Apple will not approve if you don't provide valid reason to send email via webservice. They might think you are trying to spam users.
Create a web service (e.g. a PHP script) that receives POST data and send an email based on it.
In your app, clicking the button simply collects all the data and POST it to your web service.
You can not check this on emulator/simulator only can check on device. And in device you need to configure any email account like gmail or outlook mail.
var emailDialog = Ti.UI.createEmailDialog();
emailDialog.subject = "Hello from Titanium";
emailDialog.toRecipients = ['foo#yahoo.com'];
emailDialog.messageBody = '<b>Appcelerator Titanium Rocks!</b>';
var f = Ti.Filesystem.getFile('cricket.wav');
emailDialog.addAttachment(f);
emailDialog.open();

How to retrieve email address after the recipient click on a button inside email

I am working on a web apps with Asp.Net (C#) and I have a problem like this:
I will sent out an email for more than one person and there is a link in the email. If user click on the link I want to retrieve the email address of the respondent (as query string or whatever).
Is it possible?
How should I do?
Thanks in advance.
If you generate the emails dynamically, you can add a token to the url that is unique to each email address you send to. Your landing page will use the tokens to register a hit to a database.
On another note, please remember to handle information like email addresses with great care (i.e. securely), for example when storing them in a database.

MVC 2 Contact Form

How do I create a contact form that will submit to an email address? The email account will be hard coded and grabbed from a form field to cc sender.
Thanks!!
You'll need the form to submit to a controller action on the server (I'm assuming ASP .NET MVC 2 based on the question's title) which will build and send the email.
There are plenty of tutorials on how to actually send the email. Basically, you use the mail objects from System.Net to construct a message and send it to an SMTP server. Naturally, this means you'll need an SMTP server you can use. Your email provider may or may not have a public one. If not, that's a whole other question.