Welcome Guest, Not a member yet? Register   Sign In
Intermittent Email Send Failure
#3

Extract of code that formats and send the emails

PHP Code:
    $mode    getOption'email_mode' );
    $email  Services::email();
    $email->clearTRUE );

/* Block of code creating html email body */

    $email->setTo( ( $mode !== 'SANDBOX' ) ? $mailto '[email protected]);
    if ( !empty( $mailCC ) ) {
        $email->setCC$mailCC );
    }
    $email->setSubject$subject );
    $email->setMessage$theMessage );
    $email->setReplyTo'[email protected]''System Name' );
    $email->setFrom'[email protected]''System Name' );
    foreach ( $attachments as $attachment ) {
        $email->attach$attachment );
    }
    $email->setNewline"\r\n" );

    $return'status' ]  $email->sendFALSE );

    if ( !$return'status' ] ) {
        $return'message' ]            $email->printDebugger();
        $emailRecord'reason_failed' ] = $return'message' ];
    }

// Write email record to log
// return $return 

//////
EMail Config as set in .env


Code:
email.userAgent = 'System Name'
email.protocol  = 'smtp'
email.SMTPHost  = 'mail.acme.co.za'
email.SMTPUser  = '[email protected]'
email.SMTPPass  = 'the password'
email.SMTPPort  = '465'
email.SMTPCrypto = 'ssl'
email.mailType = 'html'


All other Email variables are CI default.
Dirk B.
ESD Digital
No SEO spam - see forum guidelines
Reply


Messages In This Thread
Intermittent Email Send Failure - by abatrans - 04-25-2022, 06:03 AM
RE: Intermittent Email Send Failure - by InsiteFX - 04-26-2022, 12:12 AM
RE: Intermittent Email Send Failure - by abatrans - 04-26-2022, 02:06 AM
RE: Intermittent Email Send Failure - by InsiteFX - 04-27-2022, 12:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB