i am trying to connect PDA to SAP using SAP Web Service.
my visual studio version is Visual Studio 2008 Professional Edition.
i followed this great tutorial Create/Consume SAP Web service using SOAP Manager
i have added web service in my C# project , please find the below code.
SAP_WSDL.z_web_service_name service = new PDA_APP.SAP_WSDL.z_web_service_name();
SAP_WSDL.ZmmBatchPutawayFromPhp data = new PDA_APP.SAP_WSDL.ZmmBatchPutawayFromPhp();
data.PBktxt = "Test";
NetworkCredential cred = new NetworkCredential();
cred.UserName = "XXXXX";
cred.Password = "******";
service.Credentials = cred;
service.Proxy = new WebProxy("IP" , 1);
SAP_WSDL.ZmmBatchPutawayFromPhpResponse response = new PDA_APP.SAP_WSDL.ZmmBatchPutawayFromPhpResponse();
response = service.ZmmBatchPutawayFromPhp(data);
after deploying i am getting exception(WebException was unhandled) as could not establish connection to network.
System.Net.WebException - {"Could not establish connection to network."}
Stack Trace:
" at System.Net.HttpWebRequest.finishGetResponse()\r\n at System.Net.HttpWebRequest.GetResponse()\r\n at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)\r\n at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke(String methodName, Object[] parameters, WebClientAsyncResult asyncResult)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)\r\n at PDA_APP.SAP_WSDL.z_web_service_name.ZmmBatchPutawayFromPhp(ZmmBatchPutawayFromPhp ZmmBatchPutawayFromPhp1)\r\n at PDA_APP.login.button2_Click(Object sender, EventArgs e)\r\n at System.Windows.Forms.Control.OnClick(EventArgs e)\r\n at System.Windows.Forms.Button.OnClick(EventArgs e)\r\n at System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam)\r\n at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)\r\n at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)\r\n at System.Windows.Forms.Application.Run(Form fm)\r\n at PDA_APP.Program.Main()\r\n"
Status : System.Net.WebExceptionStatus.ConnectFailure
please help me out to solve this problem.
Looks like some networking issues from your client to the SAP SOAP server. Here is some tips and tricks to check connectivity between the client and server.
Use Ping And Tracert: The utilities can be used to check if the client can see the server. First try ping which is just a basic check if the server available on the client network. Keep in mind that some network restrict use of ping. Secondly try tracert(Trace Route). This utility will show you a list of IP that the client has to travel to to get the server.
If both the steps above work and you can confirm that the server is reachable on the network then you can try to do a telnet sessions from the client to the server on the port where the service lives. If you can connect then you DON'T have a network issue if you cannot connect you probably have a firewall issue between your client and server.
In Summary:
Try to ping it. If this is successful then telnet to it. If you cannot ping try a tracert to the server if this is successful then telnet to it.
I have solved this by myself , i have activated Web service which i created in soamanager in SAP using SICF T.Code it solved my issue. thanks all for the effort.
Related
This is a very popular topic here, and I have read at least twenty different stackoverflow, expertsexchange, codeproject "solutions", and they boil down to things like: proxy servers (which they assure me isn't being used), and other things that just don't help me.
I have an image that is sitting out on this server. It can be publicly reached through a URL (I won't give that here, being this is a customer server). The URL that is exposed is through a Virtual Directory that is set up through IIS.
I opened Visual Studio and created a new ASP.NET Web Application - and I made it an empty project, and added one WebForm to it. Simple as simple can be.
The only code I added was to the WebForm Page_Load function:
protected void Page_Load(object sender, EventArgs e)
{
using (System.Net.WebClient wc = new System.Net.WebClient())
{
Uri myUri = new Uri(#"http://SERVER/folder/Image.bmp", UriKind.Absolute);
byte[] bytes = wc.DownloadData(myUri);
}
}
That's it. That's all I do.
Because that URL is publicly exposed, when I run it in Visual Studio. It works.
Also, at work, I have a Web Server with IIS (The IIS that comes with Windows Server 2008 R2 Standard - Service Pack 1). I just copied my whole project folder (after I built for release), plopped it on inetpub/wwwroot/, went to IIS, added it as an Application (using annonymous access, and the Default App Pool).
Here, at work, no problem! No errors.
Now, I do the same thing to their server. Just take the whole folder. Create an application, etc. etc. .... and as soon as I get to the DownloadData piece of code I get an exception:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [redacted]:80
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [redacted]:80
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [redacted]:80]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +8409635
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) +611
[WebException: Unable to connect to the remote server]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +365
System.Net.WebClient.DownloadData(Uri address) +111
WebClientTest.WebForm1.Page_Load(Object sender, EventArgs e) in c:\Users\[me!!!]\Documents\Visual Studio 2013\Projects\WebClientTest\WebClientTest\WebForm1.aspx.cs:18
System.Web.UI.Control.OnLoad(EventArgs e) +103
System.Web.UI.Control.LoadRecursive() +68
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3811
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2053.0
So, to recap:
Simple project works in my debugging environment. Check!
Works on my server at work. Check!
Doesn't work on client server. Not Check!
There has to be some explanation for this. Obviously I can see the host. So why, when they host this code, instead of me, does it fail to establish a connection? Finding this information, or what can cause this, is surprisingly difficult. It has to be some type of server setting, right?
Their server is Windows Server 2012 R2 Standard.
EDIT: I also want to mention that I can open a browser anywhere (my desktop, my VM which hosts my debugging environment, their server, etc.) and if I take that URL, the bitmap displays. No problem. As soon as IIS/ASP.NET get involved ... connections fail. This is so discouraging.
EDIT2: I have a public facing cloud server, that has the same setup (same type of virtual directory, an image, etc). So I added a second WebForm to this project. Same code in PageLoad, this time pointing to my server for the image, instead of theirs. That page works! There's definitely something on their server that is causing this. But what?
I've tried using FtpWebRequest and EnterpriseDT.Net.Ftp on an Azure website where I want to pass a byte array from a FileUpload to another FTP site.
This works on local servers and hence will work on a VM but cannot get it working on an Azure website. Admittedly we're trying to avoid the costs of adding a VM or an additional Azure storage account.
It seems the port is blocked on Azure, yet it is open to us on local servers.
[IOException: Failed to connect to XXX.XXX.XXX.XXX:21 within timeout 120000 ms]
EnterpriseDT.Net.StandardSocket.InternalConnect(EndPoint remoteEP, Int32 timeout) +272
EnterpriseDT.Net.StandardSocket.Connect(EndPoint remoteEP, Int32 timeout) +350
EnterpriseDT.Net.Ftp.FTPControlSocket.ConnectSocket(BaseSocket socket, String address, Int32 port) +66
EnterpriseDT.Net.Ftp.FTPControlSocket.Initialize(BaseSocket sock, String remoteHost, Int32 controlPort, Int32 timeout, Encoding encoding) +57
EnterpriseDT.Net.Ftp.FTPClient.Connect(String remoteHost, Int32 controlPort, Int32 timeout) +407
EnterpriseDT.Net.Ftp.FTPClient.Connect() +43
EnterpriseDT.Net.Ftp.FTPConnection.Connect() +456
XXXXX.XXXXX.XXX.XXXXX.FtpUpload(String Id, FileUpload file, String ftpServer, String ftpUsername, String ftpPass, String domainName) +371
Does anyone know how this can be accomplished via .net FtpWebRequest or a third party library?
The FTP port (21) is blocked for an Azure website directly, if you use: ftp://{sitename}.azurewebsites.net, to get the proper FTP profile for that website you need to download it's publishing settings, there you'll find the address, user name and password.
Information on getting the publish profile is here: http://blogs.msdn.com/b/avkashchauhan/archive/2012/06/26/deploying-windows-azure-website-using-visual-studio-web-publish-wizard.aspx
I would also recommend you use the VFS endpoint of your scm site (https://{sitename}.scm.azurewebsites.net) to upload files, this way you use https protocol which is more reliable.
The VFS api:
https://github.com/projectkudu/kudu/wiki/REST-API#vfs
More about your scm site:
http://blogs.msdn.com/b/windowsazure/archive/2014/03/04/windows-azure-websites-online-tools-you-should-know-about.aspx
I am writing a Windows service using c# .NET 4.0 (my development workstation is Windows 7).
The aim is to send an email from the service directly in case of errors during processing.
I've included a code snippet to show what i am trying to achieve:
try
{
string emailAddresses = "me#sample.com";
string emailCCAddresses = "you#sample.com";
//Send the email
using (MailMessage mailMsg = new MailMessage())
{
mailMsg.To.Add(emailAddresses);
mailMsg.From = new MailAddress("winService#sample.com");
mailMsg.CC.Add(emailCCAddresses);
mailMsg.Subject = " Error Message ";
mailMsg.Body = DateTime.Now + " : Invalid File Encountered." ;
////Creating the file attachment
using (Attachment data = new Attachment("C:\\users\\sample.xml", MediaTypeNames.Application.Octet))
{
//Add timestamp info for the file
ContentDisposition disposition = data.ContentDisposition;
disposition.ModificationDate = File.GetLastWriteTime("C:\\users\\sample.xml");
mailMsg.Attachments.Add(data);
SmtpClient emailClient = new SmtpClient("example.Sample.com", 25);
emailClient.DeliveryMethod = SmtpDeliveryMethod.Network;
emailClient.UseDefaultCredentials = true;
emailClient.Send(mailMsg);
}
}//end using
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
The issue i am facing is - the email option does not work from a win service on any windows 7 machine. However the exact same code will work on a Win XP machine perfectly fine. Caveat, this cannot be tested as a console app. It needs to be run as a service to see the behavior. I put the same code in a console application and it worked fine on my win 7 machine.
Additionally, i enabled the telnet client and server windows features and was able to send email via the command prompt successfully.
I tried a few things to try and isolate the cause (none worked) -
Setting the NetworkCredential explicitly and setting UseDefaultCredentials = false.
emailClient.Credentials = new System.Net.NetworkCredential("username","pwd","Domain1");
changing the Log On As option of the service to be my userid and pwd
The From and To email addresses are authentic, not dummy addresses(in my real code that is!)
The only differences i can find is that the windows service is installed under the local system account. But changing the log on as should have caused it to use my authentication details/the credentials specified in the code. The IT guy in my office said the only difference he saw was that my message was sent as a relay(not sure what this means as the from/to and log on as accounts when updated to my login did not change the outcome)
the exception i see being caught is :
SMTP Exception thrown : System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions XXX.XXX.XXX.XXX XX
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
Any ideas are appreciated!
I feel it has to do with a windows 7 security policy/feature and hopefully might be as simple as changing a default setting.
You can run service as current user. Just select option USER in service installer and it will work as current user. I got the same error today and I found this solution. I hope it will be helpful for anybody.
I found it was the security policy on our new work laptops and the IT department refused to let us change it. Our test server doesn't have the same issue , of ourse it's not windows 7 either so I can't be 100% sure. Try sending email via command line to see if smtp is allowed from your pc.
The same code worked fine whn run on a win xp or windows server machine which didn't hav any restrictions
I am sending an email from a WPF application. When sending as a domain user on the network, the emails sends as expected. However, when I attempt to send email over a VPN connection, I get the following exception:
Exception:
System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed.
at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)
at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
I have tried using impersonation as well as setting the Credentials on the SmtpClient. Neither seem to work:
using (new ImpersonateUser("myUser", "MYDOMAIN", "myPass"))
{
var client = new SmtpClient("myhost.com");
client.UseDefaultCredentials = true;
client.Credentials = new NetworkCredential("myUser", "myPass", "MYDOMAIN");
client.Send(mailMessage);
}
I've also tried using Wireshark to view the message over the wire, but I don't know enough about SMTP to know what I'm looking for.
One other variable is that the machine I'm using on the VPN is Vista Business and the machine on the network is Win7. I don't think it's related, but then I wouldn't be asking if I knew the issue! :)
Any ideas?
I solved this by connecting outlook on a VPN machine to the Exchange server. The IP address automatically resolved to a different server name than the one I was trying. Evidently the exchange server was only available over VPN through the other URL.
Unable to test sending email from .NET code in Windows Vista Business.
I am writing code which I will migrate to an SSIS Package once it its proven. The code is to send an error message via email to a list of recipients.
The code is below, however I am getting an exception when I execute the code.
I created a simple class to do the mailing... the design could be better, I am testing functionality before implementing more robust functionality, methods, etc.
namespace LabDemos
{
class Program
{
static void Main(string[] args)
{
Mailer m = new Mailer();
m.test();
}
}
}
namespace LabDemos
{
class MyMailer
{
List<string> _to = new List<string>();
List<string> _cc = new List<string>();
List<string> _bcc = new List<string>();
String _msgFrom = "";
String _msgSubject = "";
String _msgBody = "";
public void test(){
//create the mail message
MailMessage mail = new MailMessage();
//set the addresses
mail.From = new MailAddress("me#domain.com");
//set the content
mail.Subject = "This is an email";
mail.Body = "this is a sample body";
mail.IsBodyHtml = false;
//send the message
SmtpClient smtp = new SmtpClient();
smtp.Host = "emailservername";
smtp.Port = 25;
smtp.UseDefaultCredentials = true;
smtp.Send(mail);
}
}
Exception Message
Inner Exception
{"Unable to read data from the transport connection: net_io_connectionclosed."}
Stack Trace
" at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)\r\n at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)\r\n at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)\r\n at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)\r\n at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)\r\n at System.Net.Mail.SmtpClient.GetConnection()\r\n at System.Net.Mail.SmtpClient.Send(MailMessage message)"
Outer Exception
System.Net.Mail.SmtpException was unhandled
Message="Failure sending mail."
Source="System"
StackTrace:
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at LabDemos.Mailer.test() in C:\Users\username\Documents\Visual Studio 2008\Projects\LabDemos\LabDemos\Mailer.cs:line 40
at LabDemos.Program.Main(String[] args) in C:\Users\username\Documents\Visual Studio 2008\Projects\LabDemos\LabDemos\Program.cs:line 48
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.IO.IOException
Message="Unable to read data from the transport connection: net_io_connectionclosed."
Source="System"
StackTrace:
at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)
at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
InnerException:
There are several things that can cause this problem, and here are some of the things that I've found.
Questions: You mention "Exchange" -- Is this an exchange server? Does the host require authentication (maybe you need to add authentication to the client)? What I would try doing first is assigning the host to the static IP address instead of the host name to see if that works first. If it does then it's most likely a problem with the DNS mapping.
If you are running your exchange server with Virtualization, you need to configure the SmtpClient to the host IP of the Virtual Server, not the physical hosting server name or IP. Right click on Default SMTP virtual server, select Properties, then go to Access tab, click Relay then add the IP address of the computer that send SMTP request to the SMTP server. (ASP.net site)
If this doesn't work, it's because the server is blocking you from sending SMTP packets. You need to make sure to add the box you are sending the SMTP messages from to the SMTP server. This is done through IIS's authentication tab.
I would also like to point out that you should dispose the mail client, or use the client in a "using" statement. This will make sure that the "QUIT" is sent to the server and gracefully close the connection.
using(SmtpClient smtp = new SmtpClient())
{
smtp.Host = "emailservername";
smtp.Port = 25;
smtp.UseDefaultCredentials = true;
smtp.Send(mail)
}
Restart IIS. I know this sounds silly, to do a restart for everything. (and sorry to bump up an old thread). But sometimes restarting IIS works magic. I faced the exact same issue and restarting solved it.
Might have happened cause temporarily the name 'localhost' couldn't be resolved. I;m just posting here so that someone who faces it now will probably try this quick fix before attempting to investigate further. Hope it helps
If you've specified an IP address in the SMTP Service settings then make sure you're specifying that IP address of the machine within IIS7 and not putting localhost.
IIS7 makes it easy to select 'localhost' but that will lead to this error if the IP for instance is 10.0.0.1
If you are using localhost (Use Localhost) in IIS 7, then change it to IP address of the machine instead of localhost or 127.0.0.1
Also follow below link to update your mail server relay accordingly:
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc#xyz.com
Vista and Windows 7 does not have any SMTP server, this facility has been removed since Windows XP, so you need to setup your SMTP server explicitly, several tools are available in market for that, you can check that out.
Also once you configure the SMTP, remember to check the server name which you would be using to send the e-mail.
I had the same issue since I had multiple IP on my server (Virtual Servers) and my host was pointing to localhost while my SMTP Virtual Server was assigned to one particular IP:
<smtp deliveryMethod="Network">
<network host="localhost" port="25" defaultCredentials="false"/>
</smtp>
There are 2 solutions for this:
Change your code and set host to the particular IP that is being used by SMTP Virtual Server instead of localhost.
Change SMTP Virtual Server IP to All Unassigned
To see/change SMTP Virtual Server IP:
Right click on Default SMTP virtual server, select Properties, on General tab change/see IP address.
Hope this saves someone's day with the same issue.
I have found that the Vista Business OS does not come with IIS SMTP. I suspect this is the missing piece of the puzzle. Has anyone had any luck with this issue?
Is your code incompleted.Dash is correct in identifying it.Other then that check smtp component is installed or not
check link text
I am facing this issue last 6hr and I am new on that so I am trying to solve this issue in following way
1) I opened command prompt (e.g. Ctrl + R type cmd and enter).
2) And check to SMTP server ping and check response.
3) If it’s gets response then it’s ok and to move next step 4 other wise smtp name is wrong.
4) Then I check by telnet smtp port (e.g. 25 ) is open or not.
5) Using this cmd we check the SMTP response.
6) telnet "yoursmtpname" "portno” (e.g. telnet smtp.gmail.com 25)
7) If telnet is not working, please install or add from control panel in add new features.
8) If it’s working then it’s pass result like.
9) 220 mx.google.com ESMTP .
Using above steps we can find out smtp connection is ready or not to sending mail.
I developed a Windows Service application in VB using .NET Framework v4.5 and recently ran into this issue.
First, a little background - I ran into the OP's error after trying to deal with the error "Service not available, closing transmission channel. The server response was: Error: too many messages in one session" which was resolved by calling the Dispose method on the SmtpClient object after each email sent. Just to be ultra safe, I also called Dispose on the MailMessage object.
Okay, so now the 'too many messages in one session' issue is resolved but now I occasionally got the 'Unable to read data from the transport connection: net_io_connectionclosed' error. Awesome. Turns out I had not implemented my email class consistently - in one instance, it was being disposed of while in the other it was not.
Here's an example of what resolved both issues for me (it's in VB but you get the idea):
With New clsEmail(True)
With .Message
.To.Add("user#domain.com")
.Subject = msgSubject
.Body = msgContents
End With
.Server.Send(.Message)
.Server.Dispose()
.Message.Dispose()
End With
My email class has, among other things, has 2 properties - Message (System.Net.Mail.MailMessage) and Server (System.Net.Mail.SmtpClient) which is what's being disposed in this example.
I haven't had a single problem after hundreds of emails once every single instance that sends email in my service was implemented in this way.
upgrade to .NET 4.0 and apply all security updates
I was facing the same issue for one month. I tried all the possible solutions provided on Microsoft's official site. Finally, I found the root cause of it.
I have updated targetFramework from 4.5.2 to 4.6.1 in web.config file.
compilation debug="true" targetFramework="4.6.1"
httpRuntime maxRequestLength="183500800" executionTimeout="3600" targetFramework="4.6.1" enableVersionHeader="false"
the above solution worked for me, and now my emails are triggering successfully from the application.