"F include"
Code:
const
mail_AtTerminate = 1;
mail_AtError = 2;
Procedure SendEmail(URL, Email, Password, Name, Recipient, CC, BCC, Subject, Message, Attachment, AttachmentMime: String);
var
Sock: SSLSocket;
begin
Pro_InitSocket(Sock, nil, nil, nil, nil);
Pro_CreateSocket(Sock, '');
Pro_SetSSL(Sock, false, false, true);
Pro_SetVerbose(Sock, true);
Pro_SMTP(Sock, PChar(URL), PChar(Email), PChar(Password), PChar(Name), PChar(Recipient), PChar(CC), PChar(BCC), PChar(Subject), PChar(Message), PChar('text/plain; charset=UTF-8'), PChar(Attachment), PChar(AttachmentMime));
Pro_FreeSocket(Sock);
end;
Procedure SendEmail(URL, Email, Password, Name, Recipient, CC, BCC, Subject, Message: String); overload;
begin
SendEmail(URL, Email, Password, Name, Recipient, CC, BCC, Subject, Message, '', '');
end;
Procedure SendEmail(URL, Email, Password, Name, Recipient, Subject, Message: String); overload;
begin
SendEmail(URL, Email, Password, Name, Recipient, '', '', Subject, Message);
end;
Updated Finclude
Code:
const
mail_AtTerminate = 1;
mail_AtError = 2;
function SendEmail(Url: string): string;
var
S: SSLSocket;
Res: ProMemoryStruct;
begin
S.Init();
S.SetURLFollow(true);
S.SetURL(URL);
S.DoGet(Res);
SetLength(Result, Res.Size);
MemMove(Res.Memory^, Result[1], Res.Size);
S.Free;
end;
Procedure SendEmail(URL, Email, Password, Name, Recipient, CC, BCC, Subject, Message: String); overload;
begin
SendEmail(URL);
end;
Procedure SendEmail(URL, Email, Password, Name, Recipient, Subject, Message: String); overload;
begin
SendEmail(URL, Email, Password, Name, Recipient, '', '', Subject, Message);
end;
Compiles and was sending email reports some months ago. I haven't updated either 'my custom finclude or prosocks' and can't remember if i did anything else.