Code: Select all
sub SendAlert (wksym as string)
Dim eMailAddress, eSubject as string
Dim eMailer as object
Dim eMailClient as object
Dim eMessage as object
eMailAddress = "xxxxxx@yahoo.co.uk"
eSubject = "Stop Loss sell Alert"
eMailer = createUnoService("com.sun.star.system.SimpleSystemMail")
eMailClient = eMailer.querySimpleMailClient()
eMessage = eMailClient.createSimpleMailMessage()
eMessage.Recipient = eMailAddress
eMessage.Subject = eSubject
eMessage.Body = "wksym" 'temporary whilst testing
'AttachmentURL = convertToUrl("c:\users\fjcc\desktop\99Export.txt")
'eMessage.Attachement = array(AttachmentURL)
eMailClient.sendSimpleMailMessage ( eMessage, com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE )
End Sub
BASIC runtime error.
An exception occurred
Type: com.sun.star.uno.Exception
Message: Send email failed.
After warning me with thefollowing message
There is no email program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default Programs control panel
I have checked my associations and "Mail" is set as the default.
I have have looked around the forum and it appears several users have this problem but there doesn't appear to be a simple solution.