i receiving error message "warning: mail(): "sendmail_from" not set in php.ini or custom "from:" header missing in \wdp\dfs\46\8\7\8\4649635878\user\sites\1400094.site\www\mfpt2016\mfpt.php on line 54"
<?php $emailsubject = 'mfpt submission'; $webmaster = 'todd@treble-one.com'; $email = $_post['email']; $firstname = $_request['firstname']; $lastname = $_request['lastname']; $organization = $_request['organization']; $addressline2 = $_request['addressline2']; $city = $_request['city']; $stateprovince = $_request['stateprovince']; $country = $_request['country']; $zippostalcode = $_request['zippostalcode']; $telephone = $_request['telephone']; $title = $_request['title']; $writtenpaper = $_request['writtenpaper']; $suggested_conference_session = $_request['suggested_conference_session']; $suggested_conference_track_other = $_request['suggested_conference_track_other']; $coauthor = $_request['coauthor']; $abstract = $_request['abstract']; $body = <<<eod email: $email firstname: $firstname lastname: $lastname organization: $organization addressline1: $addressline1 addressline2: $addressline2 city: $city stateprovince: $stateprovince country: $country zippostalcode: $zippostalcode telephone: $telephone title: $title writtenpaper: $writtenpaper suggested_conference_session: $suggested_conference_session suggested_conference_track_other: $suggested_conference_track_other coauthor: $coauthor abstract: $abstract comments: $comments eod; $host = "mail.treble-one.com"; $username = "todd@treble-one.com"; $password = "*******"; $headers .= 'from: name <mfpt@mfpt.com>' . "\r\n"; $headers = "content=type: text/html\r\n"; $headers = "cc: $email\r\n"; //line 54 $success = mail ($webmaster, $emailsubject, $body,$headers); print " thank you inquiry in touch shortly."; ?> `
one issue headers see first, append $headers before set, reassign twice.
$headers .= 'from: name <mfpt@mfpt.com>' . "\r\n"; $headers = "content=type: text/html\r\n"; $headers = "cc: $email\r\n"; should be:
$headers = 'from: name <mfpt@mfpt.com>' . "\r\n"; $headers .= "content=type: text/html\r\n"; $headers .= "cc: $email\r\n";
Comments
Post a Comment