Hi there, I have written a system that sends out emails to various people in response to various activities within the system. The emails are set to come from different originator addresses, and are generated through the PHP htmlMimeMail class. If anyone has experience with this, would greatly appreciate your assistance.
Basically, the client I am working for has set up a generic email: [email protected] (example address) with which I am setting some emails to come from. The email address is set up correctly at the company and is receiving emails correctly from my system when being sent TO this address. however, when I send emails to people within the company FROM this generic email address, eg. to [email protected] FROM [email protected] - the emails are not being received. I think it may be a SPAM filtering issue, not sure...the code I am using is as below, wondered if there was a setting I need to be setting to get the email through. I am setting the email_server SESSION to be company.co.nz, however, the emails are being sent through my host as the system is hosted on my server - perhaps this is the issue? All emails are going out ok, the issue is getting them into the clients organisation and past their filters...just wondering if something I can do my side or its something that has to be done through their IT team? CODE IS AS FOLLOWS $_SESSION['email_server'] = 'company.co.nz'; $mail= new htmlMimeMail(); $mail->setReturnPath('[email protected]'); $mail->setFrom('[email protected]'); $mail->setHeader('Reply-To','[email protected]'); $mail->setHeader('X-Mailer','Company'); $mail->setSubject('blah blah'); $mail->setSMTPParams('localhost','25'); $mail->setHtml('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" <http://www.w3.org/TR/html4/loose.dtd> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><style type="text/css"> body { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; color:#333333; } </style> <body >'blah blah blah'</body> </html> '); $mail->send(array('[email protected]'),'smtp'); ANY HELP WOULD BE MUCH APPRECIATED :) -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
