[No Bug] SendMail() PB 5.4x (forgot to install libcurl)
Posted: Wed Dec 16, 2015 8:11 pm
Hi,
now SendMail() does not crash in thread
http://www.purebasic.fr/english/viewtop ... 23&t=62636
But now it is not working with or without thread.
And also on Debian 7 x64.
Still the same program for testing:
It shows now always failed.
It works without problems with PB 5.31 x64
Bernd
now SendMail() does not crash in thread
http://www.purebasic.fr/english/viewtop ... 23&t=62636
But now it is not working with or without thread.
And also on Debian 7 x64.
Still the same program for testing:
Code: Select all
EnableExplicit
Procedure Send(*Dummy)
Protected.i Mail
Protected Alarm$
Mail = CreateMail(#PB_Any, "supervisor@smarthome.ednt.de", "Test")
If Mail
PrintN("created")
Alarm$ = "That's the main body"
PrintN("before SetMailBody")
SetMailBody(Mail, Alarm$)
PrintN("after SetMailBody")
AddMailRecipient(Mail, "root@localhost", #PB_Mail_To)
PrintN("after AddMailRecipient")
If SendMail(Mail, "127.0.0.1")
PrintN("success")
Else
PrintN("failed")
EndIf
EndIf
EndProcedure
Define.i Thread
InitNetwork()
OpenConsole()
PrintN("Called normal:")
Send(0)
PrintN("")
PrintN("Now as thread:")
Thread = CreateThread(@Send(), 0)
WaitThread(Thread)
It works without problems with PB 5.31 x64
Bernd