示例#1
0
from psdi.server import MXServer
from psdi.util import MXException
from ute.utils import Security
from psdi.util import MXException
from psdi.util import MXApplicationException
from java.rmi import RemoteException
from java.lang import System

nuevalinea = System.getProperty("line.separator")
emailDestino = "*****@*****.**"
emailOrigen = "*****@*****.**"
asunto = "asunto"
mensaje = "<b>prueba&oacute;</b>"
MXServer.sendEMail(emailDestino, emailOrigen, asunto, mensaje)
print "fin"
    if (rs2.next() == False):
        str.append('--NO RECORDS--')
        str.append('\n')
    else:

        while True:
            orgid = rs2.getString('orgid')
            siteid = rs2.getString('siteid')
            count = rs2.getString('count')

            str.append(orgid)
            str.append('\t')
            str.append(siteid)
            str.append('\t')
            str.append(count)
            str.append('\n')
            if (rs3.next() == False):
                break
        rs2.close()
    str.append('\n')
    s.close()
except Exception, e:
    str.append("error in db")

emailBody = ''.join(str)
emailTo = ['*****@*****.**']
emailFrom = '*****@*****.**'
emailSubject = 'Daily Monitoring Check List'

MXServer.sendEMail(emailTo, emailFrom, emailSubject, emailBody)
	if (rs2.next()== False):
		str.append('--NO RECORDS--');
		str.append('\n');
	else:
		
		while True:
			orgid = rs2.getString('orgid');
			siteid = rs2.getString('siteid');
			count = rs2.getString('count');

			str.append(orgid);
			str.append('\t');
			str.append(siteid);
			str.append('\t');
			str.append(count);
			str.append('\n');
			if (rs3.next() == False) :
				break	
		rs2.close();
	str.append('\n');
    	s.close();
except	 Exception, e:
	str.append("error in db");
	
emailBody = ''.join(str);
emailTo = ['*****@*****.**'] ;
emailFrom = '*****@*****.**';
emailSubject = 'Daily Monitoring Check List';

MXServer.sendEMail(emailTo, emailFrom, emailSubject, emailBody);