Tag Archives: email

how to test php email using WAMP

Questions: I have wamp installed and am using it as my testing ground. I can’t however test the PHP mail() function as it always falls over. Is this something that can be rectified? exact message: Warning: mail() [<a href=’function.mail’>function.mail</a>]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in… Read More »

php mail() function gets spam email

Questions: All my emails I am sending in local WAMP or on server, with PHP mail() function, goes to SPAM folder always. While looking for the issue, I found we’ve to set headers like from id, reply to, return path, mime version, char type and charset.. I have set all of them, but still email… Read More »

Does FILTER_VALIDATE_EMAIL make a string safe for insertion in database?

Questions: $str = ‘”mynam@blabl”@domanin.com’; filter_var($str, FILTER_VALIDATE_EMAIL);//return valid email. the above email returns true… Fair enough that RFC 2822 says it’s a legal email address. my question is if you validate an email using the above could an email carry sql injections that can harm the db even though you have filtered it with filter_var? Answers:

attach file to email using php

Questions: I have an input on my form to allow a user to browse to a file location. The idea being that they can attach a resume to to the application they are getting ready to submit. <label class=”description” for=”element_5″>Upload a File </label> <div> <input id=”element_5″ name=”element_5″ class=”element file” type=”file”/> For my text feilds and… Read More »

Sending email via SMTP on zend framework

Questions: $config = array(‘auth’ => ‘login’, ‘username’ => ‘****@gmail.com’, ‘password’ => ‘****’, ‘port’ => ’25’, ‘ssl’ => ‘tls’); $transport = new Zend_Mail_Transport_Smtp(‘smtp.googlemail.com’, $config); what should i do after that, where can i put the body and the recipient address. Answers:

Sending Email with PHP and ensuring it doesn't get blocked

Questions: I want to send an HTML email with PHP. I was wondering what headers should be used in the email to ensure it doesn’t get blocked or end up in SPAM folders. The email contents will contain CSS and HTML. The reply-to field will be different than the sender’s ( will this affect anything?… Read More »

workaround for the 990 character limitation for email mailservers

Questions: Wanted to know if there are any functions/classes/etc.. to help with the 990 character limitation for email as my HTML is being effected due to this. The Problem: (Source) Note that mailservers have a 990-character limit on each line contained within an email message. If an email message is sent that contains lines longer… Read More »