1,075
社区成员
发帖
与我相关
我的任务
分享
if MyUtil_SMTP_Msg_Init()<0 then
MessageBox('错误','发送邮件初始化失败!',StopSign!);
return
end if
if MyUtil_SMTP_Msg_SetInfo(1,1,'user_test@163.com')<0 then
MessageBox('错误','发送邮件地址设置失败!',StopSign!);
return
end if
if MyUtil_SMTP_Msg_SetInfo(1,2,'user_test')<0 then
MessageBox('错误','发件人设置失败!',StopSign!);
return
end if
if MyUtil_SMTP_Msg_SetInfo(2,1,'user@gmail.com')<0 then
MessageBox('错误','收件人设置失败!',StopSign!);
return
end if
if MyUtil_SMTP_Msg_SetInfo(3,1,"主题!")<0 then
MessageBox('错误','主题设置失败!',StopSign!);
return
end if
if MyUtil_SMTP_Msg_SetInfo(5,1,"这是邮件的正文!")<0 then
MessageBox('错误','正文设置失败!',StopSign!);
return
end if
if MyUtil_SMTP_Connect('smtp.163.com',25,'user_test','password123')<0 then
MessageBox('错误','连接失败!',StopSign!);
return
end if
if MyUtil_SMTP_Msg_Send()<0 then
MessageBox('错误','发送失败!',StopSign!);
return
end if
if MyUtil_SMTP_Disconnect()<0 then
MessageBox('错误','断开连接失败!',StopSign!);
return
end if