Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Multiple Files #1

Open
halilhanbadem opened this issue May 3, 2018 · 7 comments
Open

Send Multiple Files #1

halilhanbadem opened this issue May 3, 2018 · 7 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@halilhanbadem
Copy link
Owner

Everyone, hello!

I want to tell you about an update. With this update, you will now be able to send multiple attachments. There are some rules, of course. You need to do something like this.

 //First File

    AttachFiles.Add('D:\WP.png');
    AttachFilesType.Add('image/png');
    AttachFilesID.Add('1');

    //Second File

    AttachFiles.Add('D:\deneme.txt');
    AttachFilesType.Add('text/plain');
    AttachFilesID.Add('2');

If you leave one of these three line codes blank or you never write; as a result you get such a message.

image

That's all you need to do to send multiple messages.

Result:

image

Easy codings!

@halilhanbadem halilhanbadem self-assigned this May 3, 2018
@halilhanbadem halilhanbadem added the help wanted Extra attention is needed label May 3, 2018
@halilhanbadem halilhanbadem reopened this May 5, 2018
@zihnimetafor
Copy link

zihnimetafor commented Mar 3, 2020

merhaba;

Mail komponentinde ekte eklenen dosyaların isimleri yer almıyor. Sorunla ilgileniyorum çözüm bulursam paylaşacağım
Sanırım Şu Şu şekilde kullanmak daha mantıklı olacaktır.

var
i:integer;
begin
i:=0;
if OpenDialog1.Execute then
begin
i:=i+1;
mail.AttachFiles.Add(OpenDialog1.FileName);
mail.AttachFilesType.Add(GetMIMEtype(OpenDialog1.FileName));
mail.AttachFilesID.Add(IntToStr(i));
end;
end;

GetMIMEtype ile FilesType değerini otomatik olarak ekletiyorum.
Herhangi bir dosyanın MIME Type Değerini otomatik olarak alıyor.

Sanırım componentin içerisine ekleyip paylaşmak gerekiyor

@halilhanbadem
Copy link
Owner Author

Merhaba,
isterseniz projeyi fork edin. Kendi hesabınız üzerinden istediğiniz güncellemeyi yapabilirsiniz.
Yakın zamanda bu bileşeni güncellemek istiyorum. Eğer siz bu vesileyle katkı sağlarsanız memnun olurum.

Kısa bir zamanda ilgili sorunu çözmek ümidiyle.
Gelişmeleri takip edeceğim.

@aliyesilcicek
Copy link

Merhabalar mail göndermeye çalıştığımda SSL hatası alıyorum. (SSL neogtation failed)

Screenshot_1

yardımcı olabilir misiniz ?

@zihnimetafor
Copy link

Merhaba;

Componentin pas dosyası içerisinde Connect prosedürüne giderek

// LHandlerComponent.SSLOptions.SSLVersions := [sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvSSLv3, sslvTLSv1_1, sslvTLSv1_2];

Commentlenmiş alanı kaldırarak

LHandlerComponent.SSLOptions.Method := sslvTLSv1_2;
LHandlerComponent.SSLOptions.Mode := sslmUnassigned;
LHandlerComponent.SSLOptions.VerifyMode := [];
LHandlerComponent.SSLOptions.VerifyDepth := 0;

alanını ayarlayabilirsiniz.

@aliyesilcicek
Copy link

Screenshot_3

Bu şekilde gönderdim sanırım çalışıyor bir kaç deneme daha yapacağım. yardımlarınız için teşekkür ediyorum.

@ViniciusBairral
Copy link

The Email Component for Delphi works great, I just noticed that the attached files lose their name and file type.
Checked HHBMailSend.pas File and corrected line 252
// FileName := ExtractFilePath(FAttachFileName); Attached files do not display the name correctly
FileName := ExtractFileName(FAttachFileName);
And now the email system is perfect. How do I post the change. Send a message to vinicius.bairral@gmail.com
alteracao

@halilhanbadem
Copy link
Owner Author

Hi ViniciusBairral,

Many thanks for your contribution! You can create a Pull Request. Thus, the change will be displayed on the repository you made.

Details: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

or you can send an e-mail to me@halilhanbadem.dev

Best Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants