⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testssmtp.c

📁 嵌入式linux下面的邮件发送程序
💻 C
字号:
#include <stdio.h>
#include "ssmtp.h"

int main(int argc, char *argv[])
{

 SMTP_Client_Info client;
 SMTP_Mail_Info mail;
 initClientInfo(&client);
 initMailInfo(&mail );

 client.host = "smtp.163.com";
 client.fromaddr = "xdz.s@163.com";
 client.fromName = "xudz";
 client.auth_user = "xdz.s";
 client.auth_pass = "********";
 client.auth_mech = 0 ;

 mail.to = "xdz.s@163.com";
 mail.subject = "alarm from ipcamer";
 mail.body = "something has happed ,\n,please check you room!";
 mail.attachment = "abc.jpg";

 int i = sendMail(&client , &mail);
 if (!i)
 {
	 printf("mail has sent!\n");
 }else{
	 printf("mail send error!\n");
 }

	
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -