i have a very simple php email 2 sms script that can send email to mobile i.e sms. Problem is that when some one gets the mail, he got the email address of my hosting company i.e root@2444.myhosting.com I do not like. I want receiver get my own site mailing address.e.g sms@mywebsite.com What Code should i put in php script to make as stated above. If any one know please tell me here If you want my script to understand more (If you can), post here, i will PM you the script Thankyou!
Try setting this above the code that sends the mail. ini_set('sendmail_from', 'sms@mywebsite.com'); PHP: If that doesn't work, post your actual code.
it seems that this does not work. I am Sending you the Code via PM. Please check & PM me it back with setting as stated above.
You must send headers in this case. You must use following code $to = 'somebody@domain.com'; $subject = 'Mail Subject'; $message = 'This is the text of message'; $headers = 'From: youremail@yourdmain.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); PHP:
like squash mentioned you need to set your headers..you dont even have to put the right info.. you can put like lol