SmtpClient: An extension to send emails using SMTP server

Great extension! Is there a way to nullify the "attachments" line? When I send an email to an sms number (eg phonenumber@vtext.com) I get the message "[attachment(s) removed]" at the end of the message. It appears that a list block or variable block is all that is allowed for the "attachments" line. "False" is not allowed and leaving it empty causes an error. Is there a way to nullify the attachments line in the current build or a future build? Thanks again! Great work!

1 Like

What happens if you just set "attachments" to "create empty list"?

I don't recall any issues when doing this.

1 Like

I am using an empty list block. It's only an issue when I use an email-to-sms address, but that is the primary function of my app.

1 Like

Can you show your blocks?
Because when you pass an empty list as attachments then the piece of code which appends files does not get executed.

1 Like

This one?

image

1 Like

Here are the blocks. Thanks for your help! Great extension, just hoping to get it so that the Verizon bots don't add the note thinking there is an attachment that isn't there.

1 Like

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: