[56k Warn] mail from php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mkhoster
Forum Newbie
Posts: 3
Joined: Mon Jan 17, 2005 6:46 am

[56k Warn] mail from php

Post 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.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post 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.....
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post 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.
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post 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)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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 ;)
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post 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
mkhoster
Forum Newbie
Posts: 3
Joined: Mon Jan 17, 2005 6:46 am

safe mode

Post 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.
Post Reply