Exemple #1
0
function getMailer()
{
    $crypto = new \Elabftw\Elabftw\Crypto();
    // Choose mail transport method; either smtp or sendmail
    $mail_method = get_config('mail_method');
    switch ($mail_method) {
        // Use SMTP Server
        case 'smtp':
            $transport = Swift_SmtpTransport::newInstance(get_config('smtp_address'), get_config('smtp_port'), get_config('smtp_encryption'))->setUsername(get_config('smtp_username'))->setPassword($crypto->decrypt(get_config('smtp_password')));
            break;
            // Use php mail function
        // Use php mail function
        case 'php':
            $transport = Swift_MailTransport::newInstance();
            break;
            // Use locally installed MTA (aka sendmail); Default
        // Use locally installed MTA (aka sendmail); Default
        default:
            $transport = Swift_SendmailTransport::newInstance(get_config('sendmail_path') . ' -bs');
            break;
    }
    $mailer = Swift_Mailer::newInstance($transport);
    return $mailer;
}
Exemple #2
0
        <input type='text' value='<?php 
echo get_team_config('stamplogin');
?>
' name='stamplogin' id='stamplogin' />
        <span class='smallgray'><?php 
echo _('This should be the login associated with your timestamping service provider');
?>
</span>
        </p>
        <p>
        <label for='stamppass'><?php 
echo _('Password for external timestamping service:');
?>
</label>
        <input type='password' value='<?php 
echo $crypto->decrypt(get_team_config('stamppass'));
?>
' name='stamppass' id='stamppass' />
        <span class='smallgray'><?php 
echo _('Your timestamping service provider password');
?>
</span>
        </p>
        <div class='center'>
            <button type='submit' name='submit_config' class='submit button'>Save</button>
        </div>
    </form>

</div>

<!-- TABS 2 -->
Exemple #3
0
?>
</label>
        <input type='text' value='<?php 
echo get_config('stamplogin');
?>
' name='stamplogin' id='stamplogin' />
        <p class='smallgray'><?php 
echo _('Login for external timestamping service:');
?>
</p>
        <label for='stamppass'><?php 
echo _('Password for external timestamping service:');
?>
</label>
        <input type='password' value='<?php 
echo $crypto->decrypt(get_config('stamppass'));
?>
' name='stamppass' id='stamppass' />
        <div class='center'>
        <button type='submit' name='submit_config' class='submit button'><?php 
echo _('Save');
?>
</button>
        </div>
    </form>
</div>

<!-- TAB 4 -->
<div class='divhandle' id='tab4div'>
    <h3><?php 
echo _('Security settings');