I have a code to send mail from a VBA macro using CDO.
The code works fine and send an email when there is internet connection
The code to send an email is called many times at different stages of an overnight batch process
When there is no internet connection an error pops up "Transport Failed to Connect to Server". Given the batch job is running at night and it is a long process, I would love the script carring on if it cannot send the mail rather than stopping. In order to do so I have tried the following but it doesn't seem to work.
On Error Resume Next
Call subSendEmailGmail(False, "Batch about to start", "")
On Error goto 0
Does anyone have a suggestion on how to make the job keep running in case the mail cannot be sent?
Related
I have this job alert on Pentaho, when the job fails it sends me an email.
However, even if the whole ETL flow is running correctly. I am receiving an email.
that's my setting for the false result
The email I receive after I run my whole ETL flow.
I only want to receive an email when the jobs failed, how I can do that?
Are you sure all the connections to the Send mail action in the job are set to "Follow when Result is False"? I can see a green connection within all the bunch of red connections.
I'm using this FIX automation tool called VeriFIX to validate FIX messages. The problem I'm facing is, in my script I'm expecting an acknowledgement message from server in different session but there's a synchronization issue here.
The comes before my script arrives in that session and hence my scripts then keeps on waiting indefinitely for the message which has already being sent by the server.
Can anyone help me out on how to overcome this synchronization issue of VeriFIX, there are very limited options available with the tool and I couldn't find any thing useful.
What Sumbad is saying is the expected message has been received before the script has moved onto the step that expects the message.
To overcome this with veriFix Sumbad you should de-select the box that clears the queue after the last sucessfully received message.
I have client code like that:
Dim server as Object
Set server = CreateObject("some-prog-id")
Server-in-exe is launched and for some reasons it hangs from time to time. I have to kill it in taskmanager to make my client alive.
I'd like to kill Sever-in-exe process automatically when time is expired but don't know how to properly get it's ID. Actually I know process name but there could be several processes with the same name that were launched previously.
How do I determine process that was launched by my client code?
I need help to make Visual Basic not stop while sending emails.
I am using Smtp_Server.Send(e_mail) everytime it's sends an email the program stops for 5 seconds and then it's stop work for maybe 3 sec and then it sends the mail.
I want to be able to still use the program while it's sends the mail Help plz!
You can use some logging or careful observation in the debugger to confirm, but the conversation between your client and the SMTP server is probably taking 5 seconds (which is quite long, but plausible).
The solution is to use multiple threads to send email.
If you are sending batches of emails, try starting with 5-10 threads (with too many, the SMTP server on the other end might start rejecting some connection attempts).
If you are trying to send a single email at a time, but it is blocking your main application, you can use a single separate thread to perform the send.
In MC65, SIM card is already inserted. Any web site can be browsed.
In my application, there is sending email feature using Rebex. Sometimes, it cannot send email. So I tried to browse IE and I'm beware if 3G connection signal appears, sending works properly.
Around connection signal on Screen, there is "H" symbol. What is it?
For my case, it's not good to switch 3G connection by browsing IE. how to handle it.
Does the Rebex Mail throw any exception when it's unable to send email? Error message might help to diagnose the problem.
Is it possible to create a SMTP communication log file and include part of it with error message? Following code shows how to do it:
Dim mailMessage As New MailMessage()
'todo: set mail message properties
Dim smtp As New Smtp
smtp.LogWriter = new Rebex.FileLogWriter("\temp\log.txt", Rebex.LogLevel.Debug)
smtp.Connect("smtp.example.org")
smtp.Send(mailMessage)
Edit:
The 'H' symbol could mean HSDPA - high speed data transfer over 3G network.
Is it possible, that connection is dropped and IExplorer re-establishes connection automatically. In such case you may try to 'dial' connection manually. The How to establish a GPRS connection for FTP use on .NET CF post shows how.