How to config SMTP with SSL in C1 Composite ?

Topics: General
Dec 14, 2010 at 3:37 AM

I can not send my email when i use SMTP ( GMail ) .

This is my config.

	 <smtp from="">       
		 <network host="" port="587" userName="" password="mypassword" />     

Dec 14, 2010 at 3:41 AM

Please clarify!

Steps to reproduce, expected behaviour, actual behaviour.

Do you have any exception or stacktrace you can show us?


Dec 14, 2010 at 3:45 AM

Do this work from a std. page that send mail? Composite C1 uses the std. .net api for mailing and if your settings are correct (and registered in web.config) you should be fine. 

Dec 14, 2010 at 3:53 AM

marcus, shouldn't you be sleeping by now? :P

In your subject you're saying that you want to use SSL, but then you should tell .Net that as well with the 


attribute on network

Dec 14, 2010 at 4:04 AM

Hi all


I got this error when posting a comment . ( I use SMTP - Gmail ) 

"Failed to get value for function 'Composite.Community.Blog.BlogRenderer' - An error occurred during a call to extension function 'CallFunction'. See InnerException for a complete description of the error. - Failed to get value for function 'Composite.Community.Blog.Comments' - The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. p8sm9788036wff.16 - "

Dec 14, 2010 at 4:11 AM

thats because you havent enabled ssl

Dec 14, 2010 at 4:39 AM


I've just solved the problem

In SendMailFunction.cs

SmtpClient client = new SmtpClient();      

client.EnableSsl = true; // I just add this line




Dec 14, 2010 at 5:16 AM

my dear friend... you need to set it in your web.config, not hardcode it in code