.CriMson Posted June 30, 2008 Share Posted June 30, 2008 Okay, With much searching i haven't found my answer so i figured you guys could shed some light on if this is possible or not. Goal: To send an email via php to different addresses located in a MySQL database. The problem is, we don't have access to modify the server settings or the php.ini configuration, and the mail settings have not been configured, although we do have am smtp server that we can use for sending the emails. Is it possible to configure anything through the script so we can get the mail() function to work? Or is there something else i will need to do? We're trying to not use any additional extensions, but if needed it won't be a problem. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/112634-solved-mail-function-with-dynamic-configuration/ Share on other sites More sharing options...
.CriMson Posted June 30, 2008 Author Share Posted June 30, 2008 anybody have any thoughts or input? Link to comment https://forums.phpfreaks.com/topic/112634-solved-mail-function-with-dynamic-configuration/#findComment-578561 Share on other sites More sharing options...
br0ken Posted June 30, 2008 Share Posted June 30, 2008 <?php ini_set("SMTP", "smtp.server.com"); ini_set("SMTP_PORT", "25"); ini_set("sendmail_from", "[email protected]"); mail($to, $subject, $message, "From: $from\r\n"); ?> Link to comment https://forums.phpfreaks.com/topic/112634-solved-mail-function-with-dynamic-configuration/#findComment-578625 Share on other sites More sharing options...
.CriMson Posted July 1, 2008 Author Share Posted July 1, 2008 br0ken, that worked perfectly, Thanks! Link to comment https://forums.phpfreaks.com/topic/112634-solved-mail-function-with-dynamic-configuration/#findComment-579108 Share on other sites More sharing options...
dmccabe Posted July 1, 2008 Share Posted July 1, 2008 Please click the "SOLVED" button in the bottom left of this post to confirm this is now solved. Link to comment https://forums.phpfreaks.com/topic/112634-solved-mail-function-with-dynamic-configuration/#findComment-579111 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.