pari: branch aadk r610 - /branches/aadk/config/smtp_settings.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Apr 4 11:22:02 MST 2007


Author: pari
Date: Wed Apr  4 13:22:00 2007
New Revision: 610

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=610
Log:
Part2 of ssmtp settings

Modified:
    branches/aadk/config/smtp_settings.html

Modified: branches/aadk/config/smtp_settings.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/smtp_settings.html?view=diff&rev=610&r1=609&r2=610
==============================================================================
--- branches/aadk/config/smtp_settings.html (original)
+++ branches/aadk/config/smtp_settings.html Wed Apr  4 13:22:00 2007
@@ -42,7 +42,19 @@
 }
 
 gpcallbacks.savechanges = function(){
-	// generate new /etc/ssmtp/ssmtp.conf (pending) 
+	// generate new /etc/ssmtp/ssmtp.conf (pending)
+	if( !parseInt(_$('smtp_port').value, 10 ) ){
+		var cmd1 = "echo \"mailhub=" + _$('smtp_server').value + ":25" + "\" > /etc/ssmtp/ssmtp.conf ";
+	}else{
+		var cmd1 = "echo \"mailhub=" + _$('smtp_server').value +":" + _$('smtp_port').value + "\" > /etc/ssmtp/ssmtp.conf ";
+	}
+
+	var cmd2 = "echo \"FromLineOverride=YES\" >> /etc/ssmtp/ssmtp.conf ";
+	//var cmd3 = "echo \"hostname=" + hostname + "\" >> /etc/ssmtp/ssmtp.conf "; // from networking.conf
+
+	parent.astmanEngine.run_tool(cmd1,onSuccess = function() { 
+		parent.astmanEngine.run_tool(cmd2,onSuccess = function() { });
+	});
 }
 
 function load_smtpsettings(){



More information about the asterisk-gui-commits mailing list