pub struct Smtp { /* private fields */ }Implementations§
Source§impl Smtp
impl Smtp
Sourcepub fn connect(config: JsonValue) -> Self
pub fn connect(config: JsonValue) -> Self
初始化
- config 配置文件
{
"pop3_host": "pop.test.com",
"pop3_port": 995,
"smtp_host": "smtp.test.com",
"smtp_port": 465,
"send_email": "tests@email.com",
"send_pass": ""
}pub fn change_connection(&mut self, name: &str)
Sourcepub fn set_send_name(&mut self, send_name: &str) -> &mut Self
pub fn set_send_name(&mut self, send_name: &str) -> &mut Self
设置发件人名称
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Smtp
impl RefUnwindSafe for Smtp
impl Send for Smtp
impl Sync for Smtp
impl Unpin for Smtp
impl UnwindSafe for Smtp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more