I am creating an application using php. I want to send a mail from my application with attachments. I get the from-address and to-address from the user at run time. Then, how i set the SMPT, port number and other details of the from-address in phpmailer class or smtp class. Please, Any one can help with any example code?