Open medusared opened 3 years ago
It shouldn't be hard to implement. It could be done as
$SENDMAIL->deliver_message()
execute $RCMAIL->smtp_init(true)
rcube_smtp::connect()
.Thanks so much. Here's what I've done:
Added to plugin config:
$config['markasjunk_email_smtp_port'] = 'XX';
Added to plugins/markasjunk/drivers/email_learn.php:
$smtp_port = $this->rcube->config->get('markasjunk_email_smtp_port');
if($smtp_port) {
$this->rcube->config->set('smtp_port', $smtp_port);
}
The above works and sends on the desired port number. Can you see any issues with this? Should it be 'rcube->config->set' or 'rcube->config->merge'? And should the port number be set back to the default after the $SENDMAIL->deliver_message()? Finally I didn't use $RCMAIL->smtp_init(true) - is that necessary? Sorry for my ignorance, any comments are very welcome to improve what I've done.
When using the markasjunk plugin with the email_learn driver to forward emails to a spam learning system, is it possible to send using a different smtp port number to the default one in the main roundcube config.inc.php? I've looked at the code for plugins/markasjunk/drivers/email_learn.php and can see it uses the rcmail_sendmail class, but is there any way to modify the code to set a custom smtp port number for sending with markasjunk plugin+email_learn? Our spam learning uses a different port number so this would be so useful to us. Thanks for any insight into finding a solution!