Reggie1977
Programmer
Hi,
I want to set the sender's name in an email but I am having problems. Heres the code I am using:
USE C:\EMAILS\EMAILS.DBF IN 0 ALIAS EMAILS
SELE EMAILS
loApp = CREATEOBJECT( "Outlook.Application" )
loMail = loapp.createitem( 0 )
WITH loMail
.recipients.ADD( "joe.johnson@o2.ie" )
.subject = "Customer Service Email"
.sender = "reggie1977@mydomain.com"
.body = ncemails.para1 + CHR(13) + ncemails.para2
.send()
ENDWITH
CLOS DATA
But I get an error message at .sender:
OLE error code 0x80020006: Unknown name.
I dont want my own name and email address appearing on the email, can anyone tell me where I am going wrong.
P.S. This is not for Spam emails if thats what you are thinking. Its a customer service app.
I want to set the sender's name in an email but I am having problems. Heres the code I am using:
USE C:\EMAILS\EMAILS.DBF IN 0 ALIAS EMAILS
SELE EMAILS
loApp = CREATEOBJECT( "Outlook.Application" )
loMail = loapp.createitem( 0 )
WITH loMail
.recipients.ADD( "joe.johnson@o2.ie" )
.subject = "Customer Service Email"
.sender = "reggie1977@mydomain.com"
.body = ncemails.para1 + CHR(13) + ncemails.para2
.send()
ENDWITH
CLOS DATA
But I get an error message at .sender:
OLE error code 0x80020006: Unknown name.
I dont want my own name and email address appearing on the email, can anyone tell me where I am going wrong.
P.S. This is not for Spam emails if thats what you are thinking. Its a customer service app.