SMTP cannot connect in LabVIEW - smtp

i want to send an email from labview with an attachment. i check telnet smtp.gmail.com 587 and this port is open and my computer has an access to it. but i don't know whats the problem is LabVIEW.
and also ,i have tried smtp.mail.yahoo.com 465 but the problem is still. the connection everything is ok.
Thanks for helping me.
Best Regards

I think you forgot to add a colon between server name "smtp.gmail.com" and port "587"
https://www.ni.com/docs/en-US/bundle/labview/page/lvcomm/smtp_open_handle.html
server address specifies the hostname or IP address of the SMTP server
you want to use to send emails. You also can specify a port number by
appending a colon and the port number to the hostname or IP address in
the format hostname:port. By default, LabVIEW uses port 25, which
works only for non-TLS SMTP servers.

Finally done!
i send by outlook service.

Related

telnet smtp.gmail.com returns no response

I can't connect to my smtp gmail from my unix environment,
when I do telnet smtp.gmail.com I get response
Trying 74.125.68.108...
telnet: connect to address 74.125.68.108: Connection timed out
Trying 2404:6800:4003:c02::6d...
How do I debug this?
Gmail requires SMTP communication with their server to be encrypted. You're opening up a connection to Gmail's server on port 465, unfortunately you won't be able to communicate with it in plaintext as Gmail require you to use STARTTLS/SSL encryption for the connection.
Try this:
telnet smtp.gmail.com 587
OR using Linux or OSx, you can try to use 465 with openssl.
openssl s_client -connect smtp.gmail.com:465
You should get lots of information on the SSL session and the response:
220 mx.google.com ...
Type in
HELO smtp.gmail.com
and you'll receive:
250 mx.google.com at your service
From there it is not quite as straightforward as just sending SMTP messages because Gmail has protections in place to ensure you only send emails appearing to be from accounts that actually belong to you. Instead of typing in "Helo", use "Ehlo". I don't know much about SMTP so I cannot explain the difference, and don't have time to research much. Perhaps someone with more knowledge can explain.
Then, type:
auth login
And you will receive the following:
334 VXNlcm5hbWU6
This is the word "Username" encoded in Base 64. Using a Base 64 encoder such as this one, encode your user name and enter it. Do the same for your password, which is requested next. You should see:
235 2.7.0 Accepted
And that's it, you're logged in.
There is one more oddity to overcome if you're using OSx/Linux terminals. Just pressing the "ENTER" key does not result in a CRLF which SMTP needs to end a message. You have to use "CTRL+V+ENTER". So, this should look like the following:
^M
.^M
250 2.0.0 OK
Not a answer,but just posting the outcomes of above suggestions.
telnet smtp.gmail.com 465
Trying 74.125.68.108...
telnet: connect to address 74.125.68.108: Connection timed out
Trying 2404:6800:4003:c02::6c...
telnet smtp.gmail.com 587
Trying 74.125.68.108...
telnet: connect to address 74.125.68.108: Connection timed out
Trying 2404:6800:4003:c02::6c...

Using port 587 to send email

I want to use port 587 to send email using an SMTP server via SSL or without SSL even. Is there any free email clients that can help me out here? My port 465 and 25 are blocked
There are many email clients that may meet your demand such as Foxmail and Thunderbird.
You can add a new account with manually without automatical config.
But you should make sure that the SMTP sever is using port 587 but not port 465 or 25. This should be configured in the server.

Plesk11 Centos6 enabling SMTP port 587

I am using Plesk11 and would like to run my won SMTP service.
My server is configured to work with port 25, yet my ISP doesnt support this, only 587. Could anyone tell me how to configure my host so that SMTP runs on port 587?
Thank you in advance!
Plesk has port 25 open by default , in order to change it without plesk over-writing it again later, and since plesk is running the service using inetd.d structures, you should change the service name.
Add a new service called smtp_plesk under /etc/services with port 587
and after that alter the /etc/xinetd.d/smpt_psa file.
See the following link with a well elaborated guide: http://www.supportfacility.com/blog/plesk/plesk-configure-qmail-to-use-alternate-port-26/

Exchange SQL Server 2008 Database Mail issue

In my web application I have created a mail sender class and set the configurations of web.config file like this:
<mailSettings>
<smtp deliveryMethod="PickupDirectoryFromIis">
<network host="smtp.domain.com"
port="587"
userName="mail#domain.com"
password="password"/>
</smtp>
</mailSettings>
This is sending email. But SQL Server database mail can not send mail with the same account info.
Only one difference is PickupDirectoryFromIis .
Is there any setting on exchange server?
In the SQL Server Logs the errors are following.
Message
The mail could not be sent to the recipients because of the mail
server failure. (Sending Mail using Account 2 (2012-09-30T16:55:04).
Exception Message: Cannot send mails to mail server. (The SMTP server
requires a secure connection or the client was not authenticated. The
server response was: 5.7.1 Client was not authenticated).
Looks like this is a Authentication issue or port no issue.
Authentication Issue:
—————————-
Please make sure you have put the information as explained below:
Server name: smtp.gmail.com ( this is really important)
port no: 587 ( on many website this is given as 465 which is wrong, use 587 )
Check : This server requires a secure connection
Check Basic Authentication
username: youremailid#gmail.com ( should have gmail.com)
password: XXXXXXXXXXXXX
confirm password: confirm your password
Port No Issue:
——————–
Make sure port 587 is opened in your machine if you are following above example. If you are using any other port number (usually its port 25) to set up database mail in your office, make sure you speak with your security team and ask them to unblock port 25. Once they unblock port 25, your databasemail will work.
Network Connectivity:
—————————–
Also check network connectivity from your machine, if you can connect to internet from your machine on which you are testing your database mail. To test, do the following
Start- Run- type cmd – Hit Enter
Type ping gmail.com -t and then hit enter.
If output displays as Request timed out, it actually means there is network connectivity problem. Otherwise, your network connectivity is good.

Need help setup windows server 2008 SMTP server

I am trying to setup windows server 2008 smtp server to relay emails to gmail smtp. Everything appears to be setup but it is not sending emails. Could you please help me figure out whats wrong.
Below is the setup:
Windows server 2008 with SMTP server
feature installed. Need SMTP server
to forward all messages to gmail smtp
server to send.
I have google apps setup for my
domain, also I can send emails
throught my test app using
gmail smtp.
SMTP Server Configuration: By default has default smtp server virtual directory.
In Properties of that virtual smtp server changed following.
Fully qualified domain name = mydomain.com
smart host = smtp.gmail.com
TCP Port = 587
Out Bound Security = Basic Authentication(my username password for google apps email account)
In domains list under virtual smtp server. I have one default domain that's server dns. I added another one for my domain name.
With above setup i am trying to redirect all email to gmail smtp.
I tested connection to smtp.gmail.com from server on port 587 through telnet and it works.
I am trying to use above server from my web application also by just dropping emails in pickup directory. It get's picked up and also accepts request form web application but never sends an email.
I can see that it adds those emails in queue folder but it stays there forever.
When i try to send emails from web app to above server it rejects if To address is other than my domain.(Am i missing something in list of domains)
Thanks for all answers, finally found solution there is a property for maximum sessions which value was 0 by default. Changed it to 100 and it send all pending emails immediately.
Possible reasons are that some SMTP servers block the outgoing messages if there domain name mismatch, possible to prevent spam mails from being sent. So for example, I will not be able to send my email with an address abc#mydomain.com from my domain yourdomain.com.
Hope that helps.
Ensure your sending domain is the same as the google apps domain
Ensure your sending address is a real address and not just an alias
IIRC you need to use STARTTLS (SSL) not basic authentication
This souds like a DNS issue. Check your /badmail directory. It will have .bad and .bdp files in there. You can open these in notepad (there will be some binary in there).
However, it may point to the possible problem.
You may also want to try and enable logging on the SMTP service. There may be something in there.