How to send an emails with SMTP Gmail

  • 1 December 2014
  • 6 replies
  • 27 views

Badge +2

Hi,

I use gmail smtp to send a message, but when I try to send a message there is an error because I did not input an username and password.
where I can input my username and password when using gmail smtp?

Regards,

Agus


6 replies

Badge +5

If you open the connectionstringeditor.exe ([INSTALLDIR]K2 blackpearlHost Serverin) and check the SMTP connection string it has a few different types of authentication. You can enter a username and password there. Although, I don't know if it'll allow you to enter an email address as the username, it might allow it to be entered, but I don't know if it'll work.

 

 

Badge +7

Hi Agus,
 
I wanted to point out this resource as well to add to Revan's post -- you can take a look at following help articles that explain how string tables and environment variable work inside K2 environment: http://help.k2.com/en/environmentlibrary_whitepaper.aspx
 
Additionally, I think this resource may be worth a shot as well if you plan to use SmartActions. See authorizedDomains: http://help.k2.com/onlinehelp/k2blackpearl/icg/current/k2_smartactions_email_security.html

Badge +2

Hi revan and alyssa_v,

I've changed the connection string with ConnectionStringEditor in ([INSTALLDIR]K2 blackpearlHost Serverin).
with setting
SmtpConnetion
Host Name : smtp.gmail.com
Password : MyPassword
Port : 587
Tls : StartTLS
UserID : MyUserName@gmail.com

but when I try to re still not able to send a message. I get the issue of the SMTP server requires a secure connection or the client was not authenticated. there is no connection string for the destination email address

Badge +7

Hi Agus,

 

So just so I can get a better picture of what's going on I have some questions:

 

A. Where is it that you're seeing the error (i.e. workspace error logs, etc.)?

B. I'm guessing you have a workflow with an email event? How're you setting it up? 

C. Branching off of B --> Are you not able to get a task notification email or are you sending emails some other way, etc?

D. After you made the changes in the ConnectionStringEditor you started getting new errors AND the previous error?

E. Is the email you put into the UserID the K2 service account? 

F. Would you be able to post a picture of the errors as they appear? 

__________________________________________________________________________________

 

Other cases:

 

A. I was able to track down another customer that got an error on their email event that was There is no connection string for the destination email address but in their case they were sending an email to a gmail account and they found that their smtp server was not configured to allow K2 to send emails externally. 

 

B. The only other customer I found with gmail smtp issues had the issue where they had a problem sending mail notifications. The changes that they made, which resolved their issue seem very similar to what you recently posted --

 

Samples:

Port=587;TLS=StartTls;Host Name=smtp.gmail.com;Authentication=plain;User ID=someaccount@gmail.com;Password=xxxx
Port=587;TLS=StartTls;Host Name=smtp.gmail.com;User ID=k2@jscottpitman.com;Password=NotGonnaTellYa;Authentication=Plain

 

__________________________________________________________________________________

 

Extra things to try/check:

 

A. You can test the mail settings with this tool: http://smtptest.codeplex.com/ 

Once you get this app to work, update the K2 settings with working settings 

 

B. Verify that all SMTP values are correct. You may view the SMTP server configured in your K2 environment through the Environment Library in your Workspace: Workspace > Management Console > Templates > Default Template > Environments > [Your Environment] > Environment Fields > Mail Server

 

 

Badge +2

Hi alyssa_v,

Thanks for help, the problem is solved

Badge +1

@agus, can you share the working configuration?

 

Thanks.

Reply