sendmail_from(changing the value in the ini file)

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
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

sendmail_from(changing the value in the ini file)

Post by Obadiah »

can anyone show me how to do this...i believe this is the reason why the mail function that im using is not working....where do i change it in the ini file and what do i change it to?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

There should only be a single place where it is set in the ini file.

http://php.net/ref.mail#ini.sendmail-from explains what you set it to.

Alternatively, you could use Swift or phpMailer.
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

i changed the following lines like the manual said but my test still reflects no_value also i still get the errors when i run the program

[mail function]
; For Win32 only.
SMTP = smtp.wispnet.net
smtp_port = 80 <- i also tried this on port 25 and it didnt work that way either

; For Win32 only.
sendmail_from = Obadiah_00@hotmail.com

also im using xampp....how would i implement swift or phpmailer with that
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Like pretty much any other PHP installation: follow their installation instructions.
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

okie....but that still doesnt answer the question as to how or why the other solution isnt working...and lets assume just for kicks and giggles that i download one of these programs....if i make a change to the php.ini file like i did before with that other solution....what is to say that the other programs will work or that php will recognize the change to the ini file....because it didnt recognize any of the changes before....no disrespect intended but please read the post entirely before replying.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

PHP didn't recognize the changes because you likely forgot to restart Apache.
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

@feyd=ahh sorry bout that i didnt think to restart....my badd you should have told me what i tell my girlfreind when shes being a total meat head, "try Alt+F4" lol....but that gets me hit....alot

k...i made the changes but now i get

Warning: mail() [function.mail]: SMTP server response: 554 5.7.1 Rejected 139.55.117.237 found in dnsbl.sorbs.net in C:\Program Files\xampp\htdocs\PHP\Login.php on line 204

Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\PHP\Login.php:204) in C:\Program Files\xampp\htdocs\PHP\Login.php on line 205

what should i do?

:wink: i tried alt+f4 but doesnt work with this one
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The IP listed was found in the DNS Blacklist of sorbs.net.
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

my super said he would look into the blacklist deal....i had no idea what a blacklist was when you told me that but that other problem is a real concern and somethin tells me even if we get the blacklist problem fixed it still will not email unless i correct the second error

Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\PHP\Login.php:204) in C:\Program Files\xampp\htdocs\PHP\Login.php on line 205

all that line 205 says is

Code: Select all

header("Location: $next_program");
i think that all that does is it sends the user to what is supposed to be his personalized version of the site(see <a href="viewtopic.php?t=53769">original post</a>)

what could be causing this problem?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You have a warning echoing out. That causes the headers to send and further calls to header() to fail and also show warnings.

viewtopic.php?t=1157 explains the error and fixes in more detail. headers_sent() may be of interest too.
Post Reply