Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9158867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:21:10+00:00 2026-06-17T13:21:10+00:00

|email addressList| email:= ‘<abc@gmail.com>,abcd ,<abcef@domail.com>’. addressList:= MailAddressParser addressesIn:email. Above code will get me an

  • 0
|email addressList|
email:= '<abc@gmail.com>,abcd ,<abcef@domail.com>'.
addressList:= MailAddressParser addressesIn:email.

Above code will get me an Ordered collection which will include all the strings, though ‘abcd’ is not a valid email id its still there in collection.

My question is how can i remove Invalid email address which don’t include ‘@’.

addressList do[:ele | " How can i check each item if it includes @ , if not remove it."]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:21:12+00:00Added an answer on June 17, 2026 at 1:21 pm

    You can take several approaches:

    Do exactly what you’ve asked for (deleting from the existing collection)

    addressList removeAllSuchThat: [:string| (string includes: $@) not ]
    

    Or you can generate a new list that includes only the valid elements like Uko proposed. Here you exchange addressList with the new list.

    addressList select: [:string| string includes: $@ ]
    

    Or you can generate a new list that excludes the invalid elements

    addressList reject: [:string| (string includes: $@) not ]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My code for sending email through Gmail's smtp: SmtpClient client = new SmtpClient(smtp.gmail.com, 587);
My Email Sending Code MailMessage msg = new MailMessage(mailer@abc.com, xyz@hotmail.com, testing email, to check
My email code isn't working. <?php if(isset($_POST['send'])){ $to = info@erbimages.com ; // change all
var email = '[John Smith] <johnsmith@gmail.com>'; var re1 = /.*<+(.*)+>.*/; var re2 = /.*\[+(.*)+\].*/;
I am sending email from Python (Django). The email host is 'smtp.gmail.com'. I am
I am fetching email of my INBOX at gmail. I want to fetch emails
I want to send email with my gmail account, I gave it a try,
I am fetching email from gmail where I can fetch body, name of the
In order to send email via GMail, I finally upgraded to Indy 10. Whilst
I want to send email on the gmail account. When i use this it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.