Swiftmailer sending just one email - php

I have a form which sends the forms contents to an email address, but I now also want to send a response to the email address filled in the form, I tried many different things but only one email gets sent either the response to the email address in the form or the form contents to me.
I'm using swiftmailer to send emails.
Any help is much appreciated.
Regards

I think your problem is sending multiple emails with switmailer.see this link http://swiftmailer.org/docs/sending.html#sending-emails-in-batch. It deals with sending batch mails.

Related

How to specify custom sender?

I'm using the $email->setFrom('no-reply#example.com'); method and it's working fine for email delivered to the registered sender.
However, the email is delivered as no-reply#example.com.
How can I include the email of the customer that has filled the form? Eh: mario#gmail.com?
If I replace $email->setFrom('mario#gmail.com'); I will get 403.
This happen because I have to register the sender. But I just need to create a simple contact form.
Is there a way to use setFrom using a custom email?
Thanks in advance
Twilio SendGrid developer evangelist here.
When sending emails with SendGrid you do need to verify the email or domain you are sending from. So, you can't use any email address as the from email.
You're creating a contact form, which is why you want the email to appear to come from the person sending it. However, what you really want from that is to be able to reply straight to the person that sent the email.
What you can do is send the email from a domain or email address you have verified and then set the reply-to header to the user's email address. You will receive the email from your chosen email address but when you go to reply the to address will be filled in with the custom email address.
$email->setReplyTo("mario#gmail.com");

PHP - trying to send an email but server don't let it

I am making a contact form in php using mail function, but the hosting is saying that I have to put into parameter 'from' email only with domain name which is the same like in the hosting. But I need to put in the 'from' email from form. Is there any way how to avoid this? I don't want to use external scripts. Thanks for any help.
you cant send emails with email adresses
that arent from your server because of security reasons otherwise you could send an email from zuckerberg#facebook.com or something similar.
use the answer to param to add the contact form email and put something that is from your server into the from

Codeigniter PHP Mailer, Sender Info

I'm using Codeigniter PHP Mailer which is hosted here: https://github.com/ivantcholakov/codeigniter-phpmailer/ and with gmail smtp it works flawless.
However,using it for a standard contact form, when visitors use that contact form and send us an email, they basically send mails from our mail address to our another mail addess. When they open their own email address, they wont be seeing what they sent in their own sent items. What I want to do is (maybe without using smtp settings) show the visitors own mail adress (the one I'm asking as an input on contact form) as the FROM part of the email I receive from my contact form. So that, in case I want to reply the mail, hitting the reply button would be enough. İnstead of doing coding tricks and showing their email somewhere I could copy/paste and send new email.
Don't do that. It's effectively forging the from address and will fail SPF checks. Instead, use your own address as the From address, and add the submitted address as a reply-to address. In PHPMailer:
$mail->From = 'youraddress#example.com';
$mail->addReplyTo($POST['emailfrom']);

Send emails on gmail

I am wondering if there is a way to send a quick email to my leads on gmail. I want to send each message to store them in the sent folder, I know that it can be done by create each compose message but it will give me the hard work to send the emails to each user and I don't like to use BCC because when I receive the emails from the users, I will only see one message in my inbox. I want to receive each email from each user.
Example:
http://oi57.tinypic.com/ztiy5f.jpg
I don't like to receive the email like this:
http://oi60.tinypic.com/4gl11e.jpg
Is there a way to do that through on VB6, PHP, gmail or whatever it is?
Sending mail using PHP, for example. It's not as easy as it used to be.
The sending part, is trivial. Most of the time folks use the mail command, pass parameters to it, and voila.
However, with today's overachieving spam filtering via ISPs, etc. -- Chances are very good that your email might not ever get received at its intended address. It might get there, most likely will be sent to spam, and can have several hours of delay.
The best way to send email, as far as I know, is with SMTP email in PHP. PHP mail vs SMTP

Adding gmail quick actions to email (via phpmailer)

So, I am trying to add a go-to-action button/label for emails for gmail customers in their inbox (see https://developers.google.com/gmail/actions/reference/go-to-action).
The email is sent via phpMailer.
I have successfully tried the example implementation for the view action within scripts.google.com. Unfortunately the example code won´t work for any email I am trying to send via phpMailer.
So far, I have checked the email markup successfully at https://www.google.com/webmasters/markup-tester/ without any errors.
After viewing the original sent email files I only recognized that the email is sent as text/plain and as text/html. Does anyone have the same issues? Any suggestions what might be wrong? Thanks in advance!

Categories