hi to everyone.. can anyone here in the forum an teach me hoe to configure "SMTP"
and "smtp_port".. i'm having problem with that.. tha script ask me to configure it in php.file.ini..
but the problem is i don't know how to do it.. i'm on the process learning php.. please help me how to configure.. just message me at my email add j3ffl33@yahoo.com.. or reply from this thread.. thank you in advance...

Recommended Answers

All 4 Replies

hi to everyone.. can anyone here in the forum an teach me hoe to configure "SMTP"
and "smtp_port"

There are a couple of ways to do this.

The most direct, permanent and effective way is to edit the php.ini file. If you're running php on a local server (i.e. your computer), then this should be somewhere in a folder created by php. With my default installation on Ubuntu, it's in "/etc/php5/apache2/php.ini"

If you don't know where the php.ini file is, you could try searching for it and editing it. In it you'll see a line that says SMTP = value . Change the "value" to what you need it to be. Same for smtp_port.

If you can't find the php.ini file, you can set the value on a per-script basis. If you use the mail functions a lot, you may want to put this in a common file and include it at the top of all your scripts.

Use the ini_set() function to set the value for each parameter. Like so...

ini_set("SMTP", "mail.optonline.net");
ini_set("smtp_port", "25");

You can use ini_set to change most of the php.ini parameters for the duration of a single script.

If you want to confirm that this was successful, use echo phpinfo() to print a complete listing of php's settings.

Good luck,
- Walkere

thank'z walkere, i'll try to search for that php.file.ini.. by the way if i using xampp, where could i find that?.. php.file.ini.. or maybe just like what you have said before, it's better to use init_set on the script.. what do you mean by this "mail.optonline.net"?.. In where the email will be sent? is that right?.. i'll try to study that ini_set function... thankz

what do you mean by this "mail.optonline.net"?

That's the name of the smtp server that I would use (for Optimum Online). You can find the name of the server from your ISP. If you use some kind of pop3 e-mail browser (like Outlook or Evolution), you used that to set up your e-mail account.

As for xampp, I've never used it so I'm not sure where the config files would be. Maybe somebody else can point that out.

- Walkere

how can i configure mysql_connect"function mysql_connect"?.. please help me..
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'username'@'localhost' (using password: NO) in C:\Php\xampp\htdocs\location1\insert.php on line 19
unable to select database
-This Error always keep on bothering me.. i don't know how to fix it.. please someone help me.. thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.