how to set smtp username and password through ini_set method

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
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

how to set smtp username and password through ini_set method

Post by eshban »

hello,

i am just using this code to send email,

Code: Select all

 
 
ini_set("SMTP","smtp.mydomain.com");
ini_set("smtp_port","25");
ini_set("sendmail_from","user@mydomain.com"); 
 
mail($To,$Subject,$Message,$From);
 
 
i have set the smtp settings through ini_set method, but i am unable to know that how can i set my SMTP USERNAME and SMTP PASSWORD through ini_set

Can anyone help me in writing the short code

Thanks
Post Reply