Issue with Load time PhpMailer (Execution)

时间:2015-12-08 19:27:37

标签: email phpmailer

I have a problem with phpmailer takes about 5 seconds to send 10 emails, I think that is a long time, because I need to send some 100 or 200 emails and the script takes too long and I get error 500.

Work with maybe 10 or 20 emails, but if i have more show error.

Need help please.

let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = " eee, MMM dd, yyyy "
let today = (NSDate())
let comps : NSCalendarUnit = NSCalendarUnit.Day
let cal = NSCalendar.currentCalendar()
let todaysDate = cal.startOfDayForDate(today)
var dateRange = [String]()

var dates = [String]()
var displayMe = [String]()

for i in 0 ... 179 {


let day = dateFormatter.stringFromDate(cal.dateByAddingUnit(comps, value: +i, toDate: todaysDate, options: [] )!)

dates += [day]

}

for (index, value) in dates.enumerate() {
var testMe = ("Day  \(index + 1)   - \( value)")
print(testMe)

displayMe += [testMe]


}



let datesOneRange = displayMe[0...13]
let datesFifteenRange = displayMe[14...28]
let datesThrityRange = displayMe[29...58]
let datesSixtyRange = displayMe[59...88]
let datesNinetyRange = displayMe[89...99]
let datesOneHunEighty = displayMe[100...179]




var dateDict = [ " 5 Days" : datesOneRange,
" 14 Days" : datesFifteenRange,
" 30 Days" : datesThrityRange,
" 60 Days" : datesSixtyRange,
" 90 Days" : datesNinetyRange,
"180 Days" : datesOneHunEighty]

struct Objects {

var sectionName : String!
var sectionObjects : [String]!
}

var objectArray = [Objects]()



for (key, value) in dateDict {
    print("\(key) -> \(value)")
    objectArray.append(Objects(sectionName: key, sectionObjects:       value))
}

If I change SMTPAuth to False for not authentication is the same problem.

0 个答案:

没有答案