chmichael 12 Posted Sunday at 09:33 PM Hello, I get a "attachment.asm" or (.htm if it's html) in the e-mail ICS 9.3 SVN sends. Any ideas ? Thank you Share this post Link to post
Angus Robertson 551 Posted Monday at 07:53 AM Sorry, you'll need to explain what you are doing with which component. Angus Share this post Link to post
chmichael 12 Posted Monday at 10:24 AM Hello, Here's the function which i send the e-mails function SendEMail(const AArgs: TArray<String>): String; var FSMTP: TSSLSmtpCli; begin FSMTP := TSSLSmtpCli.Create(nil); FSMTP.SslContext := TSslContext.Create(nil); FSMTP.SslContext.SslMinVersion := sslVerTLS1_2; with FSMTP do begin Host := 'my.emailserver.com'; Port := '587'; Username := 'myuser@emailserver.com'; Password := 'mypassword'; AuthType := smtpAuthAutoSelect; ContentType := smtpHtml; // Important !!! Set it First //Allow8bitChars := False; //ConvertToCharset := True; CharSet := 'UTF-8'; HdrFrom := 'myuser@emailserver.com'; HdrTo := 'myuser@emailserver.com'; RcptName.Text := HdrTo; HdrSubject := UTF8Encode(VarToStr(AArgs[0])); if Length(AArgs) > 1 then MailMessage.Text := UTF8Encode(VarToStr(AArgs[2])); OpenSync; MailSync; Result := ErrorMessage; FreeAndNil(FSMTP.SslContext); FreeAndNil(FSMTP); end; end; Using the v9.3 SVN version the e-mail which it sends adds an extra attachment which v9.1 didn't: (either plaintext either html) Share this post Link to post
Angus Robertson 551 Posted Monday at 11:36 AM There have been no changes to TSSLSmtpCli since V9.0, except to build with other units. I'd make sure whatever properties are used for attachments are cleared, sorry, don't know which off hand. Angus Share this post Link to post
chmichael 12 Posted Monday at 11:55 AM (edited) I think the error is header for whatever reason it's not the correct eg: v9.1: Content-Transfer-Encoding: quoted-printable v9.3: Content-Transfer-Encoding: q Seems 9.3 doesn't apply the correct header values Also Return-Path: <> is empty (in both v9.1 and v9.3) Edited Monday at 11:57 AM by chmichael Share this post Link to post
Angus Robertson 551 Posted Monday at 01:11 PM The line: FEmailBody.Add('Content-Transfer-Encoding: quoted-printable') {AG} is unchanged in 15 years. But I will test the sample to make sure it works, in a few days time. Angus 1 Share this post Link to post