I am building a hotel site for my final year project, I am trying to send an automated
email to the customers once they have book.
used this code:
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(email.Text);
message.Subject = "Hotel Reservation";
message.From = new System.Net.Mail.MailAddress("Reservation#hotel.com");
message.Body = ("Dear" + first_name.Text + "Your reservation made for " + rates.Text +" " + nor.Text + " " + "is successful. Please print out this email for reference while checkin. Thank you");
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("yoursmtphost"); smtp.Send(message);
when i run it shows me this error highlighting smtp.Send(message);:
SmtpException was unhandled by the user code and
Failure sending mail.
There are several reasons for this error.
To Email is invalid
You have not specified credentials. (UserName / Password)
There might be a firewall problem
SMTP port might be other than 25
Related
I am trying to code the telegram bot in ruby, to recognize new_chat_members, as well as responding to commands, at the moment the bot works fine it just does not recognize new members and instead responds with the else command.
Does anyone have any solutions or a work around?
require 'telegram_bot'
bot = TelegramBot.new(token: 'token api')
bot.get_updates(fail_silently: true) do |message|
puts "##{message.from.username}: #{message.text}"
command = message.get_command_for(bot)
message.reply do |reply|
case command
when /start/i
reply.text = "Hi Try /help for command list."
when /help/i
reply.text = "A list of commands that you can use.
/greet - greets new users.
/website - Provides a link to the Connect Platform.
/price - Displays current price.
/supply - Total circulating supply."
when /greet/i
reply.text = "Hello, #{message.from.first_name}. 🤖 Welcome to Connect
telegram, If you need any /help just ask."
when /website/i
reply.text = "welcome, #{message.from.first_name} to the Connect
Platform."
when /price/i
reply.text = "Current price of
when /supply/i
reply.text = "Circulating supply.
when /hi/i
reply.text = "Hi, #{message.from.first_name} Welcome to Connect
telegram, If you need any /help just ask."
if
reply.text = "Hi, #{message.from.new_chat_member}Welcome to the
connect telegram channel"
end
else
reply.text = "Hi, #{message.from.first_name} I do not know what #
{command.inspect} means, try /help for command list"
end
puts "sending #{reply.text.inspect} to ##{message.from.username}"
reply.send_with(bot)
end
end
I am trying to run popoto js example but not working.
code:
popoto.rest.CYPHER_URL = "http://localhost:7474/db/data/transaction/commit";
popoto.rest.AUTHORIZATION = "Basic " + btoa("neo4j:password");
But the cypher url not working.
You need to change the password portion of popoto.rest.AUTHORIZATION = "Basic " + btoa("neo4j:password"); to the password of the neo4j server. This assumes that the default username is still neo4j.
I have seen solutions here but they don't work for me.
I have also used different ports but no luck.
Also contacted with godaddy service they said its all good on server side.
Also tried many code but no luck either.
"Unable to read data from the transport connection: net_io_connectionclosed."
Any suggestions would be helpful.!!
MailMessage mail = new MailMessage();
mail.From = new MailAddress("abc#domain.com");
mail.To.Add("myemail#gmail.com");
mail.Subject = "My subject"
mail.Body = "My body"
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "relay-hosting.secureserver.net";
//smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Credentials = new System.Net.NetworkCredential("abc#domain.com", "****");
smtp.Port = 25;
smtp.EnableSsl = false;
smtp.Send(mail);
After 2 months i finally got the solution for this problem.
i was trying different ports with different codes too and publishing every time, but no solution.
One day i eventually published my complied projectName.dll file too and then guess what i sent emails successfully.
sometime we do the right steps but little things like these matters a lot.
I am creating a program using the QBFC13 that is supposed to create a deposit from an other current asset type of account to a bank account. However, when the depositadd method is executed the payee doesn't get filled in on the bank account. How do i get the Payee information filled out?
I dont have a high enough reputation to post pictures so this is a link to the picture of the field i need filled out: http://i.stack.imgur.com/nqWOh.jpg
Here is my current code:
Public Sub CreateDeposit()
On Error GoTo Errs
Dim depositadd As IDepositAdd
depositadd = msgSetRequest.AppendDepositAddRq()
depositadd.DepositToAccountRef.FullName.SetValue("checking")
depositadd.Memo.SetValue("newdeposit test")
depositadd.TxnDate.SetValue(Date.Today)
Dim depositLineAdd As IDepositLineAdd
depositLineAdd = depositadd.DepositLineAddList.Append()
depositLineAdd.ORDepositLineAdd.DepositInfo.AccountRef.ListID.SetValue("1EE0000-943382783")
depositLineAdd.ORDepositLineAdd.DepositInfo.EntityRef.ListID.SetValue("80002534-1335362979")
depositLineAdd.ORDepositLineAdd.DepositInfo.Amount.SetValue(150.0)
depositLineAdd.ORDepositLineAdd.DepositInfo.Memo.SetValue("test memo lineitem")
' send the request to QB
Dim msgSetResponse As IMsgSetResponse
msgSetResponse = qbSessionManager.DoRequests(msgSetRequest)
' check to make sure we have objects to access first
' and that there are responses in the list
If (msgSetResponse Is Nothing) Or _
(msgSetResponse.ResponseList Is Nothing) Or _
(msgSetResponse.ResponseList.Count <= 0) Then
Exit Sub
End If
' Start parsing the response list
Dim responseList As IResponseList
responseList = msgSetResponse.ResponseList
MsgBox(msgSetRequest.ToXMLString())
' go thru each response and process the response.
' this example will only have one response in the list
' so we will look at index=0
Dim response As IResponse
response = responseList.GetAt(1)
If (Not response Is Nothing) Then
If response.StatusCode <> "0" Then
MsgBox("DepositFunds unexpexcted Error - " & vbCrLf & "StatusCode = " & response.StatusCode & vbCrLf & vbCrLf & response.StatusMessage)
Else
MsgBox("The funds were successfully deposited in Checking")
MsgBox(msgSetResponse.ToXMLString())
End If
End If
Exit Sub
Errs:
MsgBox("HRESULT = " & Err.Number & " (" & Hex(Err.Number) & ") " & vbCrLf & vbCrLf & Err.Description, _
MsgBoxStyle.Critical, _
"Error in DepositFunds")
End Sub
This actually isn't an SDK issue, as it's how QuickBooks was designed. Because a deposit transaction in QuickBooks can contain multiple lines, the bank register won't show any names even if there's just one line. You can manually go to the bank register and add the name, but there's not a way to do it through the SDK. It's a two step process to even do it in QuickBooks, where you create the deposit, then go and edit it in the register.
If you need to have this information show from transaction using the SDK, then you might have to use Journal Entries instead of a Deposit transaction.
I am using Mail Plugin to send email in my grails application. I am doing like this ...
Config.groovy ----
grails {
mail {
host = "smtp.gmail.com"
port = 465
username = "example#gmail.com"
password = "*********"
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"465",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
} }
and Controller ---
class MailController {
def mailService
def sendmail = {
mailService.sendMail {
to "example#gmail.com"
subject "Hello Fred"
body 'How are you?'
}
}
When I am trying to send mail. It throwing ERROR
URI
/groovypublish/mail/sendmail
Class
sun.security.provider.certpath.SunCertPathBuilderException
Message
unable to find valid certification path to requested target
If I remove mail props part from my config.groovy. Then After send mail, my page loaded infinite times.
I am using localhost:8080 to send mail. I know problem is in SSL. But How can I avoid SSL part.
Please help ...
I had the same issue. Going into my virus scanner's settings and turning off outbound mail scanning solved the issue.