SmtpClient: An extension to send emails using SMTP server

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:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

As mentioned in another post, this is not working anymore in Android 11 by me (same as other Email extensions).
Below Android 11 everything is fine, but with Android 11 nothing happens, no errorMessage, no successful Message

PS: In apps already running a certain time (weeks) everything is fine, but not in new compiled apps

Maybe you need to set From field same as email.

No, same with FROM field filled out...

Nothing happens

Then post apk link here. :slightly_smiling_face: