How to send several emails in a single connection of IdSMTP?

感情迁移 提交于 2019-12-02 10:26:34

You can call TIdSMTP.Send() multiple times between a single pair of Connect()/Disconnect() calls, adjusting the TIdMessage as needed for each Send() call.

IdSMTP1.Connect;
try
  // prepare TIdMessage as needed...
  IdSMTP1.Send(IdMessage1);

  // prepare TIdMessage as needed...
  IdSMTP1.Send(IdMessage1);

  // prepare TIdMessage as needed...
  IdSMTP1.Send(IdMessage1);
finally
  IdSMTP1.Disconnect;
end;
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!