Sending emails from my computer

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
asdfghjk
Forum Newbie
Posts: 1
Joined: Wed Nov 19, 2003 12:22 am

Sending emails from my computer

Post by asdfghjk »

Hi,
I'm trying to make a newsletter and here is my code.

Code: Select all

<?
$Subject=" Newsletter";
$Message="Welcome!";
$From="Newsletter@mydomain.com";
$To="me@mydomain.com";
mail($To, $Subject, $Message, $From);
?>
I want it to send emails from my computer but it wouldn't work. What do I need to do? I have pear with PHP (PHP4.2.3) How do I use it?
Thank you very much!
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

i would suggest by starting with some mail scripts that have already been written . here is a good source to find them : http://www.evilwalrus.com
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

I want it to send emails from my computer but it wouldn't work.
I think it's more of the SMTP servers in the php.ini file or so, since you would use them to send e-mail.

-Nay
User avatar
dev2761
Forum Newbie
Posts: 16
Joined: Thu Oct 16, 2003 7:55 am
Contact:

Post by dev2761 »

Nay is absolutely right:

find the php.ini file depending on the version of windows you use.
goto in and around line n°: 595

[mail function]
; For Win32 only.
SMTP = smtp.your_isp.domain

; For Win32 only.
sendmail_from = your_address@your_isp.domain
Post Reply