We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

sending email to my account

tentavarious
tentavarious asked
on
Medium Priority
1,393 Views
Last Modified: 2013-12-18
i set up an email me form.  the form contains a textbox and when text is typed in and a button clicked i would like for the message to get sent to my business email.  The problem is when i click the button it says the message is sent but when i check my email using lotus notes the message is not there.  could someone explain why this is happening?  if i email to my hotmail account it works.  My code is below.

 Private Sub btnemail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnemail.Click
        oMail = New MailMessage
        oMail.From = "Bobcat_Employee"
        oMail.To = "Shaun_Barth@bobcat.com"
        oMail.Subject = "Comments and Ideas"
        oMail.Body = txtEmail.Text
        SmtpMail.SmtpServer = "127.0.0.1"  ' put here server IP address
        If txtEmail.Text.Length = 0 Then
            Me.RegisterStartupScript("Email", _
            "<script language='javascript'>alert('Enter Email text');</script>")
        Else
            SmtpMail.Send(oMail)
            Me.RegisterStartupScript("Email", _
            "<script language='javascript'>alert('Email was sent');</script>")
            txtEmail.Text = ""
        End If

    End Sub
End Class
Comment
Watch Question

Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Let's check some things first:
- am I correct this is Java? or is this VBscript/VBA and COM?
- are you sending mail locally, from a server using Notes or from a server using a browser?
- did you verify the log.nsf if there are any mails sent?
- what is a MailMessage? a supertype of NotesDocument?
- is there a document.send() called anywhere?
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Comes down to: gimme some background info, please...

Author

Commented:
I am using vb.net this is code behind there is some javascript that will display a message if text is sent.
I am sending locally from a server using a browser.

What i do is import a namespace from the asp.net framework " Imports System.Web.Mail" then MailMessage is a class from the imported namespace.  Then i assign a variable name like "oMail" all the properites of the class MailMessage, so i can use it with methods like oMail.from and oMail.to.  I am a vb.net programmer i am unfamiliar with lotus notes, if i change my email to my hotmail account it works.  i send the email using the STMPMail.send(oMail).  i hope this clarifies somethings.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
VB.net is not my cup of tea. Others will read this question, so don't worry.

Have you tried to fill in someone else's Notes mail address??

Asking the obvious probably: Is it a Notes-form? (No) Then where does Notes come in??

Author

Commented:
I haven't tried but i will now.  Basically it is just created a web page and it uses the default like outlook express to send mail.  Maybe if i change default to lotus it will work.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
You got Notes MAPI installed?

Author

Commented:
Not sure how could i tell? By the way changing the default and sending to someone else didnt work.
Stan ReeserTechnology Strategist

Commented:
Where is the relay you are bouncing the message off ? From what i can tell you are sending an SMTP message out, that when you send it to an address that happens to be on a notes server it never arrives, but when you send it to hot mail it does.

Check to see what settings are on the SMTP inbound but one I can think of offhand is that your from address has no vaild domain, and that is one setting :

Inbound Sender Controls      
Verify sender's domain in DNS:      Enabled

Check the server log ... see what it is doing when you send the message my guess is it is bieng rejected and with no return address you have no way to know


Stan ReeserTechnology Strategist

Commented:
Try putting your hotmail address in the from field and send it ... see if you get a message in your hotmail account.

Author

Commented:
I checked the mail log under c:\inetpub\mailroot\badmail and there was a whole bunch of files.
Stan ReeserTechnology Strategist

Commented:
You have to check the log on the domino server to see if it is rejecting the mail... or like I said but a real email address in the From so you can actually get the response domino is trying to send back to you.  
Stan ReeserTechnology Strategist

Commented:
Correction   "but a real email address"

should read "put a real email address"

Author

Commented:
I put my hotmail address in and sent a message to my bobcat address and nothing showed up in the hotmail address.  I think my email is getting deleted somewhere along the way.
Stan ReeserTechnology Strategist

Commented:
You have to check the domino server then ... call the admin and ask him to check the log.  tell heim the time you sent it amd your IP address  and he should be able to locate the entries in the log.  There are many settings on a domino server that will reject mail, but the log will tell you why it was rejected.  Have you looked into the bad mail files in c:\inetpub\mailroot\badmail to see if there might be a clue?

Author

Commented:
Yes i have checked the bad mail file how to i check the domino server?
Stan ReeserTechnology Strategist

Commented:
OK
A.  What did the bad mail files say?

B.  My guess is that you dont have direct access to your company's domino server, so you will need to do what I outlined above... contact the admin, tell him when you sent the message and your IP address and he should beable to locate the connection attempt in the domino log.  If he is not willing to do that, ask him to give you reader access to log.nsf then you can check it yourself.  You can check under mail router events and nicellaneous events (depending on the release it will vary where the relevevant info is)  then just check the times around when you sent the message, and you should be able to track down the attempt to deliver and why it wasn't received.

Author

Commented:
ok i opened the file in notepad this is what i got not sure what to make of this.

From: postmaster@gwndhcpxx-xx
To: x@y.com
Date: Sat, 27 Mar 2004 11:29:20 -0600
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
      boundary="9B095B5ADSN=_01C40DD5147B438000000019gwndhcpxx?xx"
Message-ID: <FRaqbC8wS0000000d@gwndhcpxx-xx>
Subject: Delivery Status Notification (Failure)

This is a MIME-formatted message.  
Portions of this message may be unreadable without a MIME-capable mail program.

--9B095B5ADSN=_01C40DD5147B438000000019gwndhcpxx?xx
Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Unable to deliver message to the following recipients, due to being unable to connect successfully to the destination mail server.

       Shaun_Barth@bobcat.com




--9B095B5ADSN=_01C40DD5147B438000000019gwndhcpxx?xx
Content-Type: message/delivery-status

Reporting-MTA: dns;gwndhcpxx-xx
Received-From-MTA: dns;gwndhcpxxxx
Arrival-Date: Thu, 25 Mar 2004 09:28:55 -0600

Final-Recipient: rfc822;Shaun_Barth@bobcat.com
Action: failed
Status: 4.4.7

--9B095B5ADSN=_01C40DD5147B438000000019gwndhcpxx?xx
Content-Type: message/rfc822

Received: from gwndhcpxxxx ([127.0.0.1]) by gwndhcpxx-xx with Microsoft SMTPSVC(6.0.2600.1106);
       Thu, 25 Mar 2004 09:28:55 -0600
thread-index: AcQSfeIX4bM8ImB+Q7eBu4MGApeQrQ==
Thread-Topic: Email from Welcome website
From: <x@y.com>
To: <Shaun_Barth@bobcat.com>
Subject: Email from Welcome website
Date: Thu, 25 Mar 2004 09:28:55 -0600
Message-ID: <000901c4127d$e2561200$420b3e0a@gwndhcpxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
      charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft CDO for Exchange 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Return-Path: x@y.com
X-OriginalArrivalTime: 25 Mar 2004 15:28:55.0262 (UTC) FILETIME=[E2730FE0:01C4127D]

fgdsfgsdfg


--9B095B5ADSN=_01C40DD5147B438000000019gwndhcpxx?xx--
Stan ReeserTechnology Strategist

Commented:
Ok

What this tells you is the message was not able to be delivered to the address you intended.  But we know that already, but what it tells me is you still dont have a valid email address in the return.  

x@y.com is gonna get rejected by domino if the setting I mentioned earlier is in place.  

Instead of x@y.com replace that with your yahoo account.  Then you might *** I repeat might, get a response in your yahoo account as to why it was rejected or more likely the message might even go through.  Short of that you need to contact the admin and find out what is in the logs.

Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Who says it ever reached the Domino server? There's nothing in the mail above hinting into that direction. I think something else must be the matter.

Author

Commented:
Hello, i changed the oMail.from to my hotmail address and i got a postmaster couldn't complete send error.  How can i fix this?

This is an automatically generated Delivery Status Notification.

Unable to deliver message to the following recipients, due to being unable to
connect successfully to the destination mail server.

       Shaun_Barth@bobcat.com
Technology Strategist
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
I didn't say you said it did. The whole question remains rather vague to me. How is mail supposed to flow, and how does it actually flow? I think that has to be clear first. I just don't dare to bet that mail is NOT sent through a server to Hotmail but directly. Some clarification here would be nice.

I second your last question :)
Stan ReeserTechnology Strategist

Commented:
:)

we are in agreement then.  Well the mail has to be bounced off a relay, and my very first question which remains to be answered was

"Where is the relay you are bouncing the message off ? "

I agree, this is shooting in the dark.  When people ask for help and ignore most of what you say, its hard to get anywhere.
Stan ReeserTechnology Strategist

Commented:
from this line

SmtpMail.SmtpServer = "127.0.0.1"  ' put here server IP address

I was assuming the relay was his local machine, hence the DNS stuff

Author

Commented:
Ok this is what i did i went under administrative controls, under IIS and changed the smtp default properties under the access tab and set the relay to the default ip address 127.0.0.1, should i change the ip address to something else?  I have tried your above comment i am going to now, i was just wondering if i am using the wrong ip address.

Author

Commented:
See i think that is like the default ip address should i put the ip address of my machine there instead or the ip address of the server i am using to hold my web pages. i dont know which one to use?
Stan ReeserTechnology Strategist

Commented:
I just think that you dont have the DNS set up correctly. I dont have an IIS box in front of me to tell you how to troubleshoot the DNS issue but I can check later.
Stan ReeserTechnology Strategist

Commented:
Most likely your domino admin has restrictions in place for those who can use it as a relay, so you will have to use your web server if that  is the case... depending on the version of domino if it is R6x and your server is in the "domain" of the the domino box then you might be able to use it. There are also settigns in R6x that are more flexibel.  but you should be able to do this bouncing off your IIS box.  This really doesnt have a whole lot to do with domino i am getting the feeling.  I really think this is a DNS issue.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
I might be totally off, but a Notes client cannot relay mail. Dinnertime! See you later.

Author

Commented:
sreeser i did what you said i put the 127.0.0.1 bobcat.com at the end of file and ran the nbtstat -R from the comand prompt and i tried again i got the same results.
Stan ReeserTechnology Strategist

Commented:
Where is your notes/domino server?  that is the ip addy to put in the lmhosts file not the IIS server that you are relaying from.


Stan ReeserTechnology Strategist

Commented:
What does bobcat.com resolve to?
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Can't make head nor tails from this. Can't we start all over again??

1. IF the mail ever reaches a Domino server then there MUST be an entry in either the Mail log or the Misc log whenever something went wrong. If there is no such entry, then the server hasn't been contacted.
2. If you fill in 127.0.0.1 to get to Notes, you will never succeed, for Notes-clients cannot relay mail.
3. If you mail is indeed reported as an error, because the domain bobcat.com cannot be found, then you supplied the wrong server-IP and no DNS at all, or a faulty DNS IP-address.
4. Or is it your intention that the mail that gets sent to your hotmail account is sent to your Notes account in exactly the same way?
5. Is the local mailserver a Domino server for the domain bobcat.com?
6. Is the server's fully qualifying address correctly filled in?

Check this step by step.
Stan ReeserTechnology Strategist

Commented:
I think #4 is what he is trying to accomplish ... but I am getting the feeling that there is no domino server anywhere and that we are wasting our time here.

Bobcat.com resolves to a division of ingersoll-rand that makes construction equipment.. is that the company you work for?  

Author

Commented:
Yes, i am currently interning at bobcat as a computer programmer, i am not to familiar with all the back ground of emailing, my only experience is dealing with the smtp virtual server.  basically i have a comment page that uses the code i listed at the top, to email my account a comment when the button is clicked, i could only get it to work with my hotmail address.  If i can get it to work with my bobcat account, my boss has further plans for this.  I am not too sure what the dns is or the domino server.  could making changes to the smtp virtual server help and using a different ip address, i thought the problem might be in this statement  "SmtpMail.SmtpServer = "127.0.0.1"" i dont know if thats the correct ip address.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Thanks both of you for the help, i will ask my administrator to resolve this problem
Stan ReeserTechnology Strategist

Commented:
Not sure why I only get an assist when I said this several times in earlier posts.  As for the ping  it probably is simply relayed mail  also it is quite common to turn off responses to ping requests on smtp boxes so the time outs really indicate nothing. :)

Oh well c'est la vie

Author

Commented:
I thought the ping might help me find the correct ip, so i graded before i tried really was no help and i am back to where i started, i going to have to see if system administrator could help.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
You can always ask EE to reassign points if you want to.

Stan: I just tried to sum up everything that came by, concluding that we cannot solve the problem from the outside. I think it's a 50-50 split of the points.
Stan ReeserTechnology Strategist

Commented:
no disagreement there ... just wanted to know from the author why my contribution only constituted an "assist" as I had told him long ago the problem was


A) with his dns on the mail relay sending to the domino server or
B) a problem with the mail being rejected by the domino server for a variety of criteia that you can set...primarily the host not being in DNS. never been on the recieving end of a rejected mail so I am not sure that you get any response from the server.

points don't really mean much to me as us can see last time I was here in earnest was over a year ago ...just more the recognition :)  

As for the follow up... Domino server is the mail server for lotus notes.  DNS is what tells you how to resolve bobcat.com to the ip address for the mail server.  127.0.0.1 is YOUR mail relay... mail relay is the thing that takes your code creates a message and shuttles it off to the email address using DNS to locate the destinations mx record which is hte location of the mail server.  What you need in the lmhosts file is the ip address of the domino server that routes SMTP mail. At this point I am almost convinced this is the problem.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Total agreement here.

Better check both files: lmhosts and hosts, the admin will know where to look.

Stan, obviously you know a lot about Notes, I still got two open problems. Would you please have a look at them? Looking forward to meet you again!

Author

Commented:
sreeser i will have the assisted changed to accepted, i have one more question if i go under the default smtp virtual server, under the access tab and change the relay to the irco ip address which i believe is the domino server it should work, because right now i have the connection and the relay under the default smtp virtaul server set to 127.0.0.1.
Stan ReeserTechnology Strategist

Commented:
Well it MAY work  but most likely not... here's why.  

There are open relays and closed.  open relays are easy to use and now hard to find because spammers find them and bounce literally thousands and thousands of emails off of them.  This then gets you on the ORBS black list of open relays and ppl/ISPs will not accept mail from you.  If you get your domino admin to open the relay to you you can then use it as your relay.  Depending on the version of Domino this can be easy (R6) to impossible(R4x)  If the real world IP address of your server is in the same domain as the mail server the admin may not need to do anything if he has it set as below

Perform Anti-Relay enforcement for these connecting hosts:      External hosts
Exclude these connecting hosts from anti-relay checks:      
Exceptions for authenticated users:      Allow all authenticated users to relay

This is R65 of domino.

Hope that helps
Stan ReeserTechnology Strategist

Commented:
sjef

flattery will get you everywhere... I'll absolutely take a look.  

:)

Author

Commented:
Thanks that clarifies things.
Stan ReeserTechnology Strategist

Commented:
lol i guess you cant have 2 accepted answers .. still this system is better than the old one of posting a second question LOL

Did you get it worked out with your admin?

Author

Commented:
not yet, will see if i can get it resolved tomorrow thanks for all your help i have a better understanding of what i am doing now.
Stan ReeserTechnology Strategist

Commented:
I am curious about the resolution ...post back when it is solved, or if you need more help

Stan
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Me too, I'd like to know where the "pepin" was, as they say over here.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.