[SOLVED] Try to Send email :-)

Hi everybody …
I’m trying to setup the email and I have some minor problems.
Searching the forum i find out that we can use entities and tags on subject or in the body so i made this but gives me error

the log file says: “The parameter ‘addresses’ cannot be an empty string.” what addresses ?

[Exception Info 1]

Top-level Exception
Type:        System.ArgumentException
Message:     The parameter 'addresses' cannot be an empty string.
Parameter name: addresses
Source:      System
Stack Trace: at System.Net.Mail.MailAddressCollection.Add(String addresses)
   at Samba.Services.Implementations.EMailService.<>c__DisplayClass3_0.<InternalSendEmail>b__0(String x)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Samba.Services.Implementations.EMailService.InternalSendEmail(String smtpUser, String smtpPassword, Int32 smtpPort, String toEmailAddress, String ccEmailAddresses, String fromEmailAddress, String subject, String body, String fileName, Boolean bypassSslErrors, MailMessage mail, SmtpClient smtpServer)
   at Samba.Services.Implementations.EMailService.SendEmail(String smtpServerAddress, String smtpUser, String smtpPassword, Int32 smtpPort, String toEmailAddress, String ccEmailAddresses, String fromEmailAddress, String subject, String body, String fileName, Boolean deleteFile, Boolean bypassSslErrors, Int32 retryCount, Int32 retryMinutes)
1 Like

You used a variable as a To E Mail Address field which must be supplied in the Rule containing the Send Email Action.

You should also use a variable for the E Mail Message portion where you have {ORDERS}, {TICKET TOTAL} and specify that same content in the Rule. It is not good practice to use Tags directly in Actions.

The error message shows fairly clearly what the issue is:

The parameter 'addresses' cannot be an empty string.

Show the Rule you are using to fire this Action and supply a valid email address for the Action in that Rule.

Hi Q i hope you are well

I want to try email when the order state is Delivering
you mean something like this ?

Yes.

I still suggest making the Message field a parameter as well, the same way you have done for the To field.

Depending on the Rule, you may not have access to the Tags you are using staticly in the Action. Always parameterize the fields of your Actions that will require dynamic updates/content.

change it to [:Email Address] same problem :grinning:

You must provide a valid email in the CC Email Addresses box as well.

Make the parameter fields in the Action as [:variables], then set them in the Rule.

excuse me Q to “To Address” you wrote me@here.com
i thought that there should be the receiver address …

Receiver is to address isn’t it?

Every Customer has different email address and i have a custom entity field called Email Address
For test reasons i enter a valid email address and gives me exactly the same error …

It would be {ENTITY DATA:Email Address} if custom field was called Email Address. That goes in the To Address inside rule.

change it … same problem
also try {ENTITY DATA:Customers:Email Address} with no luck

Gmail? I know gmail has very strict security options.
I had to setup a plain email account to setup my printers scan to email option as didn’t support the security protocols gmail uses.

you suggest to change email ? and if yes what service ?

Gmail lists this for settings;

Port 465 (SSL required)
Port 587 (TLS required) Dynamic IPs allowed

I’m not sure but does samba support TLS
That was the issue I had with printer.

Do you have your own domain name/hosting?

yes i have my own domain i’ll give a try

There is an option hidden away somewhere to allow less secure connections.
Had to change it for using ms outlook for a client before.

Google lists

Port 465 (SSL required)
Port 587 (TLS required)
Dynamic IPs allowed

My issue was printer didn’t support TLS

Have you got own domain name and website?
If so try a plain basic account on that.

I’m going crazy :imp: everything i try the same problem
@JTRTech i found that option and cloded it … you can find it here

Allow less secure apps
https://myaccount.google.com/security?utm_source=OGB#signin

Show all of your settings again. all of them.

Its saying Addresses which is typically the CC email.

For now i think that the error is Samba’s internal and not Google’s