SmtpClient: An extension to send emails using SMTP server

Fantastic Extension. Thank you dear Developer. It solved my problem

1 Like

You are sending email to a BCC Recipient?

1 Like

Yes. But I tried it in the "recipients" spot also, but had the same results.

1 Like

What happens when you actually send an attachment?
Also, it seems issue with the receiver.

1 Like

The attachment feature is working for the addresses going to gmail addresses (really cool!), but to the sms-to-email address I get the same tag [Attachment(s) removed]. I would completely expect that I would get that message with an sms-to-email address because sms-to-email addresses don't allow attachments (at least my carrier, Verizon, doesn't). I'm not sure what you mean by receiver. I assume you are referring to the phone carrier, Verizon (vtext.com), but I can send an email to that vtext address from gmail.com or my outlook software and I don't get the [Attachment(s) removed] tag. For some reason, the code that is being sent through the extension is suggesting to the Verizon code reader that there is an attachment with the message. I expect few people will use your extension for sms-to-email applications, but it is truly a great extension and I was hopeful. Thanks again for your great work!

1 Like

@Ken_Bushey Sorry, I can't help more because I have no idea about sms-to-email and email-to-sms.
This code adds attachments:
image

1 Like

Hey @vknow360,

First of all, Great Extension!

I wanted to ask - Can I use the same "server" section as you have shown in your example? If not, then how do I get it? (I will be sending through a Gmail Address but the receivers will be different)

Secondly, What exactly do I have to put in the "port" section? Can I use the same as yours in the example?

Thanks.

1 Like

Yes, if you want to send emails using Google account.
Otherwise your provider should have given it on their documentation page.
For example, Mailgun provides all details here:
https://documentation.mailgun.com/en/latest/user_manual.html#sending-via-smtp

Usually you should use 587.
SSL/TLS - 465
STARTTLS - 587

Ok, Thanks !! :grinning:

1 Like

Thanks @vknow360, its working perfectly, except that I am not being able to send images.

I tried two ways- Click image from camera, display it in an Image component, and then use the Image1.Picture block in the images section. However, it shows an error: "IOException while sending message"

I also tried doing it by using a file from the assets, incase it is just some problem with the Image.Picture block. I added it as a text block saying "NameOfTheImage.jpg", i checked the capitalization and the format too, but it still showed the same error: "IOException while sending message".

However, in my app, I need to use the 1st method, click photo from camera and then send it as an attachment. Please tell me if it is possible like this, or what other method can I use?

Show your blocks.

When the camera takes the photo:

When the image is displayed:

image

The main block:

image

(I have only shown the relevant blocks and have circled the relevant parts)

Can you show the do it result of Image1.Picture ?

Here:

Try removing file:// from path.

Thanks, it worked using these blocks:

But then each time I wouldn't be able to specify /storage/emulated/0/Pictures.............. etc.

What should I do for that?

:arrow_down:

Oh ok , using this block right? :

image

Yes, that will work.
@TIMAI2 Sir kindly open this topic.

Thanks A Lot !! It is working Perfectly now. Thanks Again :grinning: