mymail发送邮件总是失败!

vc555 2010-02-12 11:17:08
完全按网上的例子,但是总是在connect时出错。发件人为user_test@163.com,密码为password123

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



执行时,到MyUtil_SMTP_Connect这会返回-1,出错。不知道connect的设置哪里错了。
我用outlook配置试了下,配置时必须把"我的服务器要求身份验证"勾上才能发邮件。不知道mymail要如何调用。
...全文
217 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
永生天地 2010-02-15
  • 打赏
  • 举报
回复
你看一下 163上的设置是否支持客户端方式
老奀 2010-02-12
  • 打赏
  • 举报
回复
现在一些主流的邮件服务器已经不支持非专用邮件软件的接入,MYMAIL适用自己搭建的企业邮件服务器


1,075

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧