Page 1 of 1

[56k Warn] mail from php

Posted: Fri May 06, 2005 4:11 pm
by mkhoster
Dear all,
i use mail() function to send mails from linux servers and every thing was ok put when i use it on windows server i face many problems like how can i change the sender address and more so can u give me simple php script to do that on windows server.
thank you.

Posted: Fri May 06, 2005 4:13 pm
by John Cartwright
Have a good read of the mail function.
To change who the email is from you must send the appropriate headers along with the email, which is all explained in the link provided.

Posted: Sat May 07, 2005 2:47 am
by itsmani1
hay every one ....
i have a question here.... can i send email on some event if i can how to do that ? i mean mail function should be event dependent let say i want to send email on 25th december to my friends.
so in this case how i will use send function that i work on that date.

Thanks.....

Posted: Sat May 07, 2005 4:00 am
by infolock
only 2 ways : 1 use a cron job, 2 use task scheduler. Other than that, you'd have to be on your site in which the script would check to see if when it is accessed is the date you want it to send, and then it would execute.

Posted: Sat May 07, 2005 5:42 am
by itsmani1
infolock wrote:only 2 ways : 1 use a cron job, 2 use task scheduler. Other than that, you'd have to be on your site in which the script would check to see if when it is accessed is the date you want it to send, and then it would execute.
only 2 ways :
1 use a cron job -> What is this ?(From where i can some information about it)
2 use task scheduler -> what is this?(From where i can some information about it)

Posted: Sat May 07, 2005 9:40 am
by John Cartwright
You have been here long enought to know to search.
Both of which have been discussed more times than I can count on my fingers ;)

Posted: Sat May 07, 2005 10:42 am
by anjanesh
itsmani1 wrote:1 use a cron job -> What is this ?(From where i can some information about it)
This is normally found on Linux/Unix systems only and task scheduler on Windows.
I dont know the direct method to initate cron jobs because my host has cpanel and it has a menu to input cron jobs - you just need to enter the command or just the scriptname in the wizard proided in cpanel.
Take a look at the image - You'll find Cron Jobs at Row 6 Col 3:
Image

safe mode

Posted: Sat May 07, 2005 2:29 pm
by mkhoster
Dear all,
if my windows server work in the safe mode can i use the fourth argument of the mail() function i mean the header.