Free Support Forum - aspose.com

You do not have permission to send to this recipient

I'm getting this error message when trying to send a mail item created by Aspose Network. Please can anyone provide me a solution (or a workaround)?

Error:

Your message did not reach some or all of the intended recipients.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Subject: Test Aspose Network

Sent: 21/06/2010 11:39

The following recipient(s) cannot be reached:

Test on 21/06/2010 11:39

You do not have permission to send to this recipient. For assistance, contact your system administrator.

MSEXCH:...

Code:

Dim loMailMessage As Aspose.Network.Mail.MailMessage

loMailMessage = New Mail.MailMessage

'loMailMessage.From = New Mail.MailAddress("test@test.be", "Test", True)

'loMailMessage.From = New Mail.MailAddress("", "", True)

loMailMessage.To.Add(New Mail.MailAddress("test@test.be", "Test", True))

loMailMessage.Subject = "Test Aspose Network"

loMailMessage.AddAttachment(New Mail.Attachment("C:\Documents and Settings\UserX\Desktop\test.ppt"))

loMailMessage.HtmlBody = "test test"

Dim outlookMsg As MapiMessage = MapiMessage.FromMailMessage(loMailMessage)

outlookMsg.SetMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT + MapiMessageFlags.MSGFLAG_FROMME)

outlookMsg.SetStringPropertyValue(MapiPropertyTag.PR_SENDER_EMAIL_ADDRESS, "")

outlookMsg.SetStringPropertyValue(MapiPropertyTag.PR_SENDER_NAME, "")

outlookMsg.SetStringPropertyValue(MapiPropertyTag.PR_SENT_REPRESENTING_EMAIL_ADDRESS, "")

outlookMsg.SetStringPropertyValue(MapiPropertyTag.PR_SENT_REPRESENTING_NAME, "")

outlookMsg.Save("d:\test.msg")

Hi,


Could you please set the from address using MailMessage.From property, save the message in draft mode, open it with Outlook, manually delete the “From” address in Outlook and then send the email?

I'm sorry, I'm using outlook 2007, and it seems I can't change the from address. I'm only getting the To and CC box. (see attachment)

Code:

loMailMessage = New Mail.MailMessage

loMailMessage.From = New Mail.MailAddress("test@test.be", "Test", True)

loMailMessage.To.Add(New Mail.MailAddress("test@test.be", "Test", True))

loMailMessage.Subject = "Test Aspose Network"

loMailMessage.AddAttachment(New Mail.Attachment("C:\Documents and Settings\UserX\Desktop\test.ppt"))

loMailMessage.HtmlBody = "test test"

Dim outlookMsg As MapiMessage = MapiMessage.FromMailMessage(loMailMessage)

outlookMsg.SetMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT)

outlookMsg.Save("d:\test.msg")

I found it, it's in Options / Show From.

With the from box cleared, it's not having a problem to send the mail.

Unfortunally, I can't accept this as a workaround. We can't ask our customers to clear the from box for each mail that has been generated by Aspose.Network.

I hope you can give me other directions to fix this problem?

Best regards.

Please, is there any news regarding this problem?

Thanks.

Hi,


I am sorry we could not find any other workaround for this issue yet. Sorry for the inconvenience.