dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 48

Thread: email problem

  1. #16
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    first for more than one person .. I 'm not sure if ".resplvename" will accept the comma as normally to send to more than one email in the TO separate emails with comma :
    email1@domain1.com , email2@domain2.net
    (and this is standard FYI )

    second for the problem of multi attachment I think you have implemented the for loop outside the whole module and this is not correct ...
    the loop should be around the "addattachment" execution statements only as the format in my post #7 here ... and for example again :
    Code:
    'to send TWO attachments :
    .AttachmentIndex = 0
    .AttachmentPosition = 0
    .AttachmentPathName = txt1.Text
    
    .AttachmentIndex = 1
    .AttachmentPosition = 1
    .AttachmentPathName = txt2.Text
    obviously an array of textboxes and a for loop will be better .. !
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  2. #17
    Join Date
    Mar 2008
    Posts
    23
    what Amahdy said is correct i cannot use comma or semicolon to send to more than one person
    the .Resolve does not allow this...


    is there another way to do that?

  3. #18
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    How about adding all of the addresses into something like a ListView, and looping through the ListView doing a .Resolve and .Send with each iteration through the loop?

  4. #19
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    well I revised the control properties again ...
    first the emails you want to send to them separate between them with a comma and put them in the :
    .RecipAddress

    .RecipDisplayName is not needed and also neither the .ResolveName
    I mean all u have to do is to remove both of them and put .RecipAddress instead ...

    what makes me revise was actually that I'm pretty sure the comma is standard ..

    hope this can help !
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  5. #20
    Join Date
    Mar 2008
    Posts
    23
    i added a new text box...
    it will send me for to users , but when i click on the send buttons and when the text box are cleared and then i enter another emails i get the error:
    Invalid session
    Code:
    .ResolveName
    i still cannot put the emails in the same text box seperated by commas
    this is my code:
    Code:
       With MAPIMessages1
       
               .Compose
               .MsgSubject = txtSubject.Text
    
               '.RecipDisplayName = txtTo.Text
               '.ResolveName
    .RecipIndex = 0
    .RecipDisplayName = txtTo.Text
    .RecipAddress = txtTo.Text
    .RecipType = 1
    .ResolveName
    
    .RecipIndex = 1
    .RecipDisplayName = txtTo1.Text
    .RecipAddress = txtTo1.Text
    .RecipType = 1
    .ResolveName

  6. #21
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Quote Originally Posted by nawaray
    i still cannot put the emails in the same text box seperated by commas
    Did you try my previous suggestion?

  7. #22
    Join Date
    Mar 2008
    Posts
    23
    i didn't understand exactly what you meant..
    can you give my a simple example code?

  8. #23
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Do you know what I mean by the ListView control? Have you used it before?

  9. #24
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    Hey nawary, I told you to not execute any of the following statements :
    .RecipDisplayName
    .ResolveName

    just test it .. comment both lines and see .. I think it will send without problems ..

    otherwise I see you have worked around using indexes .. here in that case you may not need to have any comma .. just each text has one valid formated email .. that should works too ...
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  10. #25
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Quote Originally Posted by Amahdy
    here in that case you may not need to have any comma .. just each text has one valid formated email .. that should works too ...
    If all the email addresses are in a ListView, then each time through the Listview loop it would pick up a different address and send the mail.

    Each address could be resolved on an individual basis.

  11. #26
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    Hack .. I don't recommend the list view option because this is very time and memory consuming to send to one email by another .. each time you have to create a new instance .. session .. load in it the email body .. the email info in general like header and all .. and execute a big queue of emails .. what's better is to let the email engin do that for you by taking all the emails in the "TO" "CC" or "BCC" .. and the load will be once .. sending it to each email one by one ...

    nawary was u able to figure this out ?
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  12. #27
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    But it doesn't appear as though he has having a whole lot of luck taking that route.

  13. #28
    Join Date
    Mar 2008
    Posts
    23
    So Amahdy do u mean that i do like this?
    Code:
    With MAPIMessages1
       
               .Compose
               .MsgSubject = txtSubject.Text
    
               '.RecipDisplayName = txtTo.Text
               '.ResolveName
    .RecipIndex = 0
    
    .RecipAddress = txtTo.Text
    .RecipType = 1
    
    
    .RecipIndex = 1
    
    .RecipAddress = txtTo1.Text
    .RecipType = 1


    Hack
    i didn't use ListView control before

    thats why i told you i want an example

  14. #29
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    yes or go directly like that :

    Code:
    .RecipAddress = txtTo.Text & ", " & txtTo1.Text
    .send 'nothing more .. !
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  15. #30
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Quote Originally Posted by nawaray
    thats why i told you i want an example
    I'll put together a sample for you.

Similar Threads

  1. Stand alone email client for pop3 email
    By luckyluk in forum VB Classic
    Replies: 1
    Last Post: 03-18-2006, 06:36 PM
  2. Reroute All Outbound Email
    By Brian in forum Enterprise
    Replies: 0
    Last Post: 08-13-2003, 02:22 PM
  3. convert email messages to tasks utomatically
    By Anthony Meo in forum Enterprise
    Replies: 0
    Last Post: 01-15-2002, 05:44 PM
  4. Replies: 0
    Last Post: 04-03-2001, 05:22 PM
  5. Replies: 9
    Last Post: 01-26-2001, 12:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center