Hello Everybody
I sent mails from our application (VFP 9.2 with redemption and Exchange 2003) with the following code:
l_empf = ALLTRIM(thisform.txtemail.Value)
l_attach = "c:\xxxxx.log"
oOutlook = CREATEOBJECT("outlook.application")
oSafeItem = CREATEOBJECT("redemption.safeMailItem")
oNameSpace = oOutlook.GetNameSpace( "MAPI" )
oNameSpace.logon()
oMailS = oOutlook.CreateItem( 0 )
oSafeItem.item = oMailS
oSafeItem.subject = "Betrifft: Redeptiontest "
oSafeItem.Body = "Everything ok!"
oSafeItem.Recipients.Add(l_empf)
oSafeItem.attachments.Add(l_attach)
oSafeItem.sent
RELEASE osafeitem
RELEASE ooutlook
Everything works as expected. The sender is the current application user and the mail is in the sendet objects folder(outbox).
Now i have to sent mails as 'helpdesk@ourcompany.de' and i can't can it running.
I found some examples here on UT, but they all cause errors:
SafeItem.Fields.Item(Tag).Value = "helpdesk <
helpdesk@ourcompany.de >"
or
safeItem.Fields.Item(0x0C1E001E).Value = "SMTP"
safeItem.Fields.Item(0x0C1A001E).Value = "helpdesk"
safeItem.Fields.Item(0x0C1F001E).Value = "
helpdesk@ourcompany.de"
= illegal parameter count
Can someone please give me an example, how to sent mails with sender 'helpdesk'.
(The mail should be found in the outbox of helpdesk afterwards)
Any help welcomed
Best regards
Albert