我遇到的情况是SMTPserver = 'smtp.xxxx.com
SMTPport = 587
sender = 'info@xxx.com'
destination = ['testgmailid@gmail.com']
USERNAME = "info@xxxx.com"
PASSWORD = "1234"
text_subtype = 'plain'
subject="Sent from Python"
import sys
import os
import re
from smtplib import SMTP
from email.MIMEText import MIMEText
try:
msg = MIMEText(content, text_subtype)
msg['Subject']= subject
msg['From'] = sender
conn = SMTP(SMTPserver,SMTPport)
conn.set_debuglevel(True)
conn.ehlo()
conn.starttls()
conn.login(USERNAME, PASSWORD)
try:
conn.sendmail(sender, destination, msg.as_string())
finally:
conn.close()
except Exception, exc:
sys.exit( "mail failed; %s" % str(exc) ) # give a error message
包含以下类:DataManager.framework
,DataManager
和LocationManager
我无法进行基于模块的调用,例如
RecordingManager
因为我遇到了let rec : DataManager.RecordingManager
和DataManager.framework
除了重命名我的班级或框架之外,还有其他工作吗?
答案 0 :(得分:0)
阿-HA!
所以我所做的就是将我的DataManager
课程重命名为XDataManager
然后我创建了一个包级访问器:
public var sharedInstance { return XDataManager.sharedInstance }
这样,我仍然可以保留访问DataManager.sharedInstance
的旧代码,同时能够区分包DataManager
和类XDataManager