Appframe Knowledge Base


1 hits
0

How to get afSendMail to connect to multiple databases

Duplicate the <dbconnection> item in MailSettings.xml

<config>
	<afSendMail>
		<dbconnection>
			<PIMS_DEV>Server=127.0.0.1;Database=PIMS1;User ID=af_mail;Password=Pwd</PIMS_DEV>
		</dbconnection>
		<dbconnection>
			<PIMS_TEST>Server=127.0.0.1;Database=PIMS2;User ID=af_mail;Password=Pwd</PIMS_TEST>
		</dbconnection>
		<dbconnection>
			<PIMS_PROD>Server=127.0.0.1;Database=PIMS3;User ID=af_mail;Password=Pwd</PIMS_PROD>
		</dbconnection>
		<smtp>
			<server>255.255.255.255</server>
			<port>25</port>
		</smtp>
		<debug>
			<port>1002</port>
			<sessiontimeout>30</sessiontimeout>
			<logfiledirectory>c:\Appframe\Services\LogFiles\afSendMail</logfiledirectory>
		</debug>
	</afSendMail>
	...
</config>	

win · Perma link post comment Posted by: Nils Arne Ramsvik (02-feb-2012)