In this paper, we introduce and study some new generalizations of second submodules via a function phi on the set of all submodules of a module. Let R be a ring with non-zero identity, M be an R-module and phi : S(M) -> S(M) be a function where S(M) is the set of all submodules of M. A non-zero submodule N of M is said to be a phi-second submodule if, for any element a of R and a submodule K of M, aN subset of K and a phi(N) not subset of K imply either N subset of K or a is an element of ann(R)(N). Let n >= 2 be an integer and phi(n) : S(M) -> S(M) be the function defined by phi(n)(L) = (L : (M) ann(R)(L)(n-1)) for every L is an element of S(M). Then a phi(n)-second submodule of M is said to be an n-almost second submodule of M. We determine various algebraic properties of these submodules and investigate their relationships with other known submodule classes such as second, prime and semisimple submodules. We study the structure of n-almost second submodules of modules over ZPI-rings and Dedekind domains. We also give some characterizations of modules and submodules by using n-almost second submodules.