Python - 如何通过代理发送邮件

时间:2018-06-16 07:13:05

标签: python proxy smtp

"""from xsmtplib import SMTP
server = SMTP(proxy_host,proxy_port,host,port,timeout) 
server.sendmail("aaaa@gmail.com", "bbbb@gmail.com", "Test Msg")
server.quit()"""

我们非常感谢任何帮助。

下面的代码,用于通过代理连接SMTP服务器

import { Component, OnInit } from '@angular/core';
import { Router, RoutesRecognized } from '@angular/router';
import { filter, pairwise } from 'rxjs/operators';


export class AppComponent implements OnInit {

    constructor (
        public router: Router
    ) {
    }

    ngOnInit() {
        this.router.events
            .pipe(filter((e: any) => e instanceof RoutesRecognized),
                pairwise()
            ).subscribe((e: any) => {
                console.log(e[0].urlAfterRedirects); // previous url
            });
    }

0 个答案:

没有答案