Solved

one or more recipient address is .......Server response was : 554 Relay rejected for policy reasons

Posted on 2004-10-06
17
1,671 Views
Last Modified: 2012-08-14
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'CdoSendUsing.cdoSendUsingPort
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/Smtpserver") =  "10.10.1.23" '
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "someid"
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "abcdef1"
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/SendemailAddress") = "emailaddres"
mmcdoconfig.load(cdoiis)


I am using a smtp server in my company local area network to send the mail.  the smtp machine uses  lotus domino. when i run this program, it produces an error message type 0x8004020f. when i send mails inside the network, its going without any error, where as when i try to send mail to any other domain like hotmail,yahoo... it produces this error.

Server settings are exactly right. i cant modify the server setting and i asked my system admin also, he said it works fine.

Why i am saying that server settings are correct because i using lotus to send mail to other mail id's like yahoo, hotmail.... its working fine.
I tried to telnet myservername 25, it produces some error saying that recipient doesnot belong to some network jargon.........  i am not very sure about the error......

when lotus can send mails, why cant VB program send mails................. Please its quiet urgent.

Thanks in advance

0
Comment
Question by:raj_ms
  • 12
  • 4
17 Comments
 
LVL 10

Accepted Solution

by:
anv earned 500 total points
ID: 12245426
actually this happens when we use open SMTP servers...

the hotmail or yahoo...mail exchangers mark this mail as spam..and doesnot allow to pass thru...

what u can do is ... resolve the mx for the domain u want to send the email to..

like if u want to send mail to abc@yahoo.com then..

resolve the mx for yahoo.com..usually its mx1.yahoo.com...

there are some dll's etc available on the net...google typing "Visual Basic" MX resolver..

after resolving  the mx..

connect to this mx and then send mail...instead of using ur SMTP use this mx or SMTP of the recipients domain..

this way ur mail wont be blocked..

i've tried this in one of my software...u can see this process when u use Arogsoft which is also an open SMTP server..

check the log that is created while sending mail using ArgoSoft...
0
 

Author Comment

by:raj_ms
ID: 12246363
This is an component that i need to buy, i want to resolve this without buying an external component. Then how my lotus domino send mail,  why not my program
0
 
LVL 10

Assisted Solution

by:anv
anv earned 500 total points
ID: 12246510
u dont have to buy any component..

i dont remember the name of the dll i used in my project...

started with Get...

DNS Resolver are the keyword to start ur search with
0
 

Author Comment

by:raj_ms
ID: 12246524
i wonder we dont have anyother way to code and find out, instead of using the dll
0
 

Author Comment

by:raj_ms
ID: 12246545
So you mean to say that lotus uses stuffs like dll........................ to send email
0
 
LVL 10

Assisted Solution

by:anv
anv earned 500 total points
ID: 12246555
i dnt mean that..i 'm just telling u how...i i resolved the problem ...

in my project...which is know u r facing...

0
 

Author Comment

by:raj_ms
ID: 12246571
i am sorry,if the previous question might have hurted you. i didnt mean to do that, i am curious to know is there any solution thats my question is posted in such manner.
0
 

Author Comment

by:raj_ms
ID: 12246588
Why i asked you is?, normally companies dont do that by picking dll from unknown vendors
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:raj_ms
ID: 12246589
Thats the reason i am also want to implement with coding
0
 
LVL 10

Assisted Solution

by:anv
anv earned 500 total points
ID: 12246664
hi raj_ms

actually what u have to do is..

include that dll in ur project...

call the function that resolves the DNS, by pasiing the domain name as parameter..

it will return to u an MX for that domain...
in ur code replace..

mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/Smtpserver") =  "10.10.1.23

with the MX that is just returned..

and ur mail will not be rejected...

May Be if other experts have a better option than ths..they wil let u knw..
0
 

Author Comment

by:raj_ms
ID: 12246738
component is free on this site, but...............read the disclaimer, normally the components which are free will face these problems. I am doing this for a company, so if anything goes wrong then .....................    thats the reason i asked you is there any coding technique or microsoft components to solve this

http://www.internext.co.za/stefan/aspmx/

Disclaimer
This component is provided as is and without any guarantees or promises. You use it entirely at your own risk. It was written with care but cannot be certified to contain no bugs or errors. You also cannot hold me responsible if it crashes your server or starts World War III. Since it's free, I do not guarantee performance, support or error-free operation.
0
 

Author Comment

by:raj_ms
ID: 12253625
i will explain the whole question again


Dim mmcdoconfig As Cdo.Configuration
Dim mgcdomsg As Cdo.Message
Dim an As New ADODB.Connection
Dim ar As New ADODB.Recordset
Dim hn As New ADODB.Recordset
Private Sub Send_Mail(from_mail As String)
Set mmcdoconfig = New Cdo.Configuration
Set mgcdomsg = New Cdo.Message
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "jeeves"
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "someusername"
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
mmcdoconfig.Fields.Update
mgcdomsg.Subject = "subject"
mgcdomsg.MimeFormatted = True
mmcdoconfig.Load (cdoIIS)
Set mgcdomsg.Configuration = mmcdoconfig
    mgcdomsg.HTMLBody = "<html<head></head><body>hello</body></html>"

    mgcdomsg.To = "raj_unitednetworks@hotmail.com"  
    mgcdomsg.From = val3 'company@companydomain.com
   
    mgcdomsg.Send
 

 

this is the code used to send email, it works fine if a recipient email address belong to the same network(i.e, same sub domain like @samenetwork.com).
when i send mail to external email address like yahoo.....hotmail..................it gives an error

Runtimeerror'-214722097 (804020f)'

the server rejected one or more recipient addresses. the server response was: 554 Relay rejected for policy reasons.

My network have SMTP and it have lotus domino (10.10.1.23 is the address of that machine) in the same machine.

When I send an email to any accounts external or internal (eg:yahoo,hotmail.... or the samenetwork)  email account using lotus notes from my machine or any machine in the network, the mail is going to either accounts.

Whynot my program produce such errors.

My server is very much configured otherwise how can lotus send email....

0
 

Author Comment

by:raj_ms
ID: 12253641
But this program works fine for email which are internal accounts
0
 

Author Comment

by:raj_ms
ID: 12311810
This program worked by adding my ip address in the smtp external internet domain....
i want to know is there any to tackle this by programming...becaz for lotus they havent added my ip address but it can send
0
 

Author Comment

by:raj_ms
ID: 12339599
i saw lotus notes settings. in ports they were using tcp/ip that might one the reason they can send mail without using to configure the server
0
 

Author Comment

by:raj_ms
ID: 12339806
i tried to connect to smtp server in the same way as my lotus did my changing server port to tcp/ip i.e, 1, but i got the runtime error as the transport failed to connect to the server.
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'CdoSendUsing.cdoSendUsingPort
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/Smtpserver") =  "10.10.1.23" '
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 1
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "someid"
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "abcdef1"
mmcdoconfig.Fields("http://schemas.microsoft.com/cdo/configuration/SendemailAddress") = "emailaddres"
mmcdoconfig.load(cdoiis)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now