Consulting

Results 1 to 2 of 2

Thread: Sendmail bugging

  1. #1
    VBAX Newbie
    Joined
    Jun 2011
    Posts
    5
    Location

    Sendmail bugging

    2009 I rewrote excel script in office 2003 that basically records values and on specified times mails the file(after saving) to specified receivers. Worked fine back then. New version used sendmail function like this:

    ActiveWorkbook.SendMail Recipients:=receiverTable, Subject:=subject

    As said it worked. Might not have been best programming I have done in my life but had all the specified functions.

    Since then nobody has touched the code but what happened is that the office 2003 that was running it received patches. And now it does NOT work correctly.

    What happens when above line is reached is that a) it does something b) outlook express error pops up but it doesn't tell WHAT error we are talking about(no error code, no information, no nothing. Just says error happened and all things could not be completed) c) whole bunch of emails gets sent d) script seems to stop functioning unless I stop and restart it.

    Rather than having one email sent(code specifically has codes to prevent loop done multiple times and that's working allright. Multiples comes specifically on the line that has above). What's more strange is that the amount of emails increases one by one. I copied file for me and put my own address as receiver. First one message. Next run two messages. 3, 4, 5, 6, 7, 8...You can see the pattern...Needless to say original receivers weren't too happy when their mail folder were starting to get spammed like this.

    So...3 questions:

    a) Anybody have any clue where issue might be?
    b) I have suspicion that sendmail might not be standard way of doing this. Any better functions? Need to be able to send file itself to multiple receivers at once(preferably by otherway than sending one by one in a loop)
    c) In 2007 office aparantely there's no outlook or something like that what boss said. However it would be very nice if the code could be ported to newer platform(less licences for the company needed as I understand. Not just office but operating systems as well). If above is true then how does one send email? I presume that ability hasn't been removed from 2007 office?

    Thanks for any help you might be able to give.

  2. #2
    VBAX Newbie
    Joined
    Jun 2011
    Posts
    5
    Location
    Nevermind. Turns out problem was NOT programming(or even Excel) related as it was solved when I cleared out sent mail box from the outlook(some close to 10k messages...).

    Not quite sure why that would cause this behaviour but here we go. No more those, mails comes normally.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •