I have an application and I have hosted that at amazon server. I have a form by which our customer will contact to admin. As customer will fill this form and submit then email will be send to admin but all emails marked as spam if I will use a self designed template. If I will use simple text what ever typed by user then its working fine and coming in to inbox. My template have simple logo and HTML/CSS code.Is there any way to solve this?
Try this:
you can use smtp mail system.
and image of your template have to encoded as inline image.
if you use phpmailer class then use this MsgHTML($html_msg); function and your image source must be same server (that means where in mail script).
then this function automatically convert into inline image
And fillup more requirement:
*from address must be real (from addr not reply_to) reply_to may be fake.
*Subject have something
More Info
Related
If a php form is completed and send with the submit button, how can I send an e-mail together to an administrator for example? I want to sent the user's name who created a new user through a form
The creator is coming from $_SESSION['username'].
Can I use the PHP mail function to do this?
If mail is correctly set up in your php.ini file you can use this.
You can also install and use PHPMailer if you want access to a full SMTP server or a lot more fine control over how your email is built.
Yes you can use the mail function. You just have to send the input field value's from the form in the mail function.
Yes. I've posted a rather simple example on SO before which you can take a look at, also there are numerous examples elsewhere on the internet that provide you details for the task.
I'm constructing HTML emails in PHP with Zend_Mail and I'd like to embed/attach/whatever some images in such a way that Gmail will automatically display them without prompting the user. How can I do this?
Google's Bulk Sender Guidelines say that Gmail will automatically show images for senders who have authenticated their domain:
To ensure that Gmail can identify you:
Use a consistent IP address to send bulk mail.
Keep valid reverse DNS records for the IP address(es) from which you send mail, pointing to your domain.
Use the same address in the 'From:' header on every bulk mail you send.
We also recommend publishing an SPF record, and signing with DKIM or
DomainKeys.
By authenticating, inline images you send will be shown automatically. Recipients will not need to click the "Display images
below" link.
Google offers a page to learn more about email authentication.
You can't without the user approving your imagery. It's an anti-spam/ anti-tracking technique that has to be off by default to work.
You can make Gmail display images (embedded into content) with authenticating emails sent.
You just make sure you have a correct SPF record, and 1024 bit DKIM signed the message.
Then gmail shows embedded images within content.
As of my knowledge, This is not possible. Gmaill will hide the images initially. If the Use enables (by clicking "Always display images from XXXXXX website"), then it will be available from next time onwards
You can always show images if you use Base 64. That way images are embedded as code in the code and aren't coming from anyone else's server, so there is no tracking risk. Just google how to embed an image as Base 64 and that will solve your issue completely.
I manage a live music venue's newsletter and the show listings/calendar on the main site are generated using PHP. Is there a way to generate content in newsletters via php?
Example, I create the newsletter.php file, upload the code to our newsletter service provider, and when someone opens the message, the latest listings are available in their email.
As of now, I'm only seeing a portion of the php code where I'd like to see the calendar...
You can generate the content of an e-mail with any scripting language, but only before sending it. Once the e-mail has been sent, it has to be in a format that e-mail clients understand (such as plain text or HTML).
It's also very easy to send email with php, with the mail function.
You could generate the email from your php template, and if it looks how you want it to, click a button and send that email to the people on your mailing list.
It sounds like you have a newsletter-delivery service in place, but this is another option.
I have a web page that generates several email addresses. I need to be able to click on a link, which will open an email client such as outlook and populate the bcc field with those email addresses. In the past, we have used html's mailto, which achieves this goal perfectly.
My problem now is that I need to send emails to over 200 people, and mailto cannot handle that much information. Since the page also uses PHP, I have considered PHP's mail() and phpmailer(), but since both require that the entire email be generated on the page and the email client is never opened, they will not work.
Does anybody know of an alternative method I can implement to achieve this functionality?
Create a mailing list, add those e-mails to the mailing-list and send mail there instead.
As a bonus, you can use VERP to prune invalid addresses.
I don't think there is a convenient alternative method.
You could offer a textarea field containing all the addresses in a comma-separated list. That list could be easily copy+pasted into the client's E-Mail program.
If the client's E-Mail is on the same domain as the web site, and you have full control over your server, you could randomly generate E-Mail addresses on your server using PHP:
1293820239453202349#example.com
that E-Mail address would be configured to forward incoming mail (that your user with the mail client writes and sends to that one random address) to the big list of recipients. This is a very advanced method but hard to implement.
Maybe you can make an email group, depending on your mail system, such that when you send a mail to the address of the group, it will distribute to all members?
On our company, we have several groups. all#company.com, sales#company.com, developers#company.com etc. Sending one e-mail to such an address will make all members of the respective group receiving it.
MailTo with a Copy
<a href="mailto:astark1#unl.edu?cc=ASTARK1#UNL.EDU">
MailTo with a Blind Copy
<a href="mailto:astark1#unl.edu?bcc=ASTARK1#UNL.EDU">
Well, I'm trying to create a newsletter, that will send emails to users in a database. The newsletter itself would draw "events" and other activities from a database. Whats the best way to take that list, and put them in an email? I was thinking about putting them into an html page, then sending an html email, but not all emails support html(like school email). What would your guys recommend? Could you point me to some good resources?
Also, this is for a school project, so I cant use any open source type stuff, unfortunately :(
You are correct in your assumption that if you are creating html newsletters, you will also have to do a text based version for clients that don't support html or ones that ask to have e-mail be sent only in text. You will need to make sure your code sends both versions to recipients. You could also ask the recipients for their preference and send them the specific version that they requested.
For html e-mail it is highly recommended to read the following two articles by CampaignMonitor (they specialize in e-mail marketing sofware):
HTML E-mail Design Guidelines
Guide to CSS support in email
clients
Note that I am assuming you are asking for help with the actual construction of the html for the email not the code needed to create and send the newsletter.
Good luck with your project.
==== UPDATE ====
So it seems that you actually need help in developing this project. Since this is a homework, I will provide some general advice that should steer you in the correct direction and get you started on the project. Then, if you have any specific problems with your code, you can ask about them on Stackoverflow.
There is really two things that need to be done here:
In PHP, dynamically contruct a variable that contains the html or text versions of the e-mail that needs to be sent.
Loop through your contact list and e-mail the contents of that variable.
Sending E-mail
I will start with the sending e-mail portion, because the links provide bellow also show you how to construct the message. Also, in your comment you said you already know how to contruct an html from a database. The following links show you two ways to send e-mail. You can either use the Mail function that comes with PHP or download the PEAR_Mail package. If you are allowed to use additional libraries and want to send html e-mail, I would recommend using the PEAR_Mail, because it makes things much easier if you want to send a both an html and text version of an e-mail together.
Note: To send an e-mail you will need to use some sort of mail server. If you are using Windows, you can install the SMTP service that comes with IIS or you can use an external smtp service such as google to send your e-mails.
http://www.w3schools.com/php/php_ref_mail.asp
http://us2.php.net/manual/en/function.mail.php
http://www.webcheatsheet.com/php/send_email_text_html_attachment.php
http://pear.php.net/manual/en/package.mail.mail.php
http://pear.php.net/package/Mail_Mime/docs
Construct E-mail
The complexity here will depend on whether you just want a plain text e-mail or html. For either case you will need to read the event data from your database and add it to the message that you want to send.
Some Seudocode:
Loop through datarows
message = DataRow[EventDate] + " " + DataRow[EventName] + "\n"
Loop through recipients
mail message
Hopefully this gives you a start. I would recommend getting php to send out an e-mail of a static html or text first. Once you have that code working you can start working on adding the functionality of reading event info from a database and sending it out.
Hope this helps.