function helpdesk_email($name, $dept, $pri, $prob){ $to = 'admin@company.com'; $sub = 'New Ticket Submitted'; $message = ' <html><table><tr><td>Name: '. $name .'</td></tr> <tr><td>Dept: '. $dept .'</td></tr> <tr><td>Priority: '. $pri .'</td></tr> <tr><td>Problem: '. $prob .'</td></tr> </table> </html> '; $headers = "From: [email]helpdesk@company.com[/email]\r\n"; $headers .= "Content-type: text/html\r\n"; mail($to, $sub, $message, $headers); }
NightShade03 wrote: » You are correct Postfix is the way to go. Postfix will allow you to have SMTP functionality without the need for receiving mail as well. You can then use PHP mail functions to send out mail. Just a note to make sure that you do a little basic security for Postfix so that it doesn't end up being an open relay for spammers. Their website has a decent walk through to get you going in about 10 minutes. Here is a sample of PHP code in case you need it (it was from a helpdesk web application that I wrote).function helpdesk_email($name, $dept, $pri, $prob){ $to = 'admin@company.com'; $sub = 'New Ticket Submitted'; $message = ' <html><table><tr><td>Name: '. $name .'</td></tr> <tr><td>Dept: '. $dept .'</td></tr> <tr><td>Priority: '. $pri .'</td></tr> <tr><td>Problem: '. $prob .'</td></tr> </table> </html> '; $headers = "From: [EMAIL="helpdesk@company.com"]helpdesk@company.com[/EMAIL]\r\n"; $headers .= "Content-type: text/html\r\n"; mail($to, $sub, $message, $headers); }
function helpdesk_email($name, $dept, $pri, $prob){ $to = 'admin@company.com'; $sub = 'New Ticket Submitted'; $message = ' <html><table><tr><td>Name: '. $name .'</td></tr> <tr><td>Dept: '. $dept .'</td></tr> <tr><td>Priority: '. $pri .'</td></tr> <tr><td>Problem: '. $prob .'</td></tr> </table> </html> '; $headers = "From: [EMAIL="helpdesk@company.com"]helpdesk@company.com[/EMAIL]\r\n"; $headers .= "Content-type: text/html\r\n"; mail($to, $sub, $message, $headers); }
NightShade03 wrote: » You are correct Postfix is the way to go. Postfix will allow you to have SMTP functionality without the need for receiving mail as well. You can then use PHP mail functions to send out mail. Just a note to make sure that you do a little basic security for Postfix so that it doesn't end up being an open relay for spammers. Their website has a decent walk through to get you going in about 10 minutes.
DevilWAH wrote: » Ok i can't give you more rep (system don't allow it) but cheers for the pointers, all up and working now
earweed wrote: » I got him for you DevilWAH